text:
package org.apache.camel.dataformat.csv;

import java.io.InputStream;
import java.io.OutputStream;
import java.util.Arrays;

import org.apache.camel.Exchange;
import org.apache.camel.spi.DataFormat;
import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.QuoteMode;

/**
 * CSV Data format.
 * <p/>
 * By default, columns are autogenerated in the resulting CSV. Subsequent
 * messages use the previously created columns with new fields being added at
 * the end of the line. Thus, field order is the same from message to message.
 * Autogeneration can be disabled. In this case, only the fields defined in
 * csvConfig are written on the output.
 */
public class CsvDataFormat implements DataFormat {
    // CSV format options
    private CSVFormat format = CSVFormat.DEFAULT;
    private boolean commentMarkerDisabled;
    private Character commentMarker;
    private Character delimiter;
    private boolean escapeDisabled;
    private Character escape;
    private boolean headerDisabled;
    private String[] header;
    private Boolean allowMissingColumnNames;
    private Boolean ignoreEmptyLines;
    private Boolean ignoreSurroundingSpaces;
    private boolean nullStringDisabled;
    private String nullString;
    private boolean quoteDisabled;
    private Character quote;
    private QuoteMode quoteMode;
    private boolean recordSeparatorDisabled;
    private String recordSeparator;
    private Boolean skipHeaderRecord;

    // Unmarshal options
    private boolean lazyLoad;
    private boolean useMaps;
    private CsvRecordConverter<?> recordConverter;

    private volatile CsvMarshaller marshaller;
    private volatile CsvUnmarshaller unmarshaller;

    public CsvDataFormat() {
    }

    public CsvDataFormat(CSVFormat format) {
        setFormat(format);
    }

    public void marshal(Exchange exchange, Object object, OutputStream outputStream) throws Exception {
        if (marshaller == null) {
            marshaller = CsvMarshaller.create(getActiveFormat(), this);
        }
        marshaller.marshal(exchange, object, outputStream);
    }

    public Object unmarshal(Exchange exchange, InputStream inputStream) throws Exception {
        if (unmarshaller == null) {
            unmarshaller = CsvUnmarshaller.create(getActiveFormat(), this);
        }
        return unmarshaller.unmarshal(exchange, inputStream);
    }

    CSVFormat getActiveFormat() {
        CSVFormat answer = format;

        if (commentMarkerDisabled) {
            answer = answer.withCommentMarker(null); // null disables the comment marker
        } else if (commentMarker != null) {
            answer = answer.withCommentMarker(commentMarker);
        }

        if (delimiter != null) {
            answer = answer.withDelimiter(delimiter);
        }

        if (escapeDisabled) {
            answer = answer.withEscape(null); // null disables the escape
        } else if (escape != null) {
            answer = answer.withEscape(escape);
        }

        if (headerDisabled) {
            answer = answer.withHeader((String[]) null); // null disables the header
        } else if (header != null) {
            answer = answer.withHeader(header);
        }

        if (allowMissingColumnNames != null) {
            answer = answer.withAllowMissingColumnNames(allowMissingColumnNames);
        }

        if (ignoreEmptyLines != null) {
            answer = answer.withIgnoreEmptyLines(ignoreEmptyLines);
        }

        if (ignoreSurroundingSpaces != null) {
            answer = answer.withIgnoreSurroundingSpaces(ignoreSurroundingSpaces);
        }

        if (nullStringDisabled) {
            answer = answer.withNullString(null); // null disables the null string replacement
        } else if (nullString != null) {
            answer = answer.withNullString(nullString);
        }

        if (quoteDisabled) {
            answer = answer.withQuote(null); // null disables quotes
        } else if (quote != null) {
            answer = answer.withQuote(quote);
        }

        if (quoteMode != null) {
            answer = answer.withQuoteMode(quoteMode);
        }

        if (recordSeparatorDisabled) {
            answer = answer.withRecordSeparator(null); // null disables the record separator
        } else if (recordSeparator != null) {
            answer = answer.withRecordSeparator(recordSeparator);
        }

        if (skipHeaderRecord != null) {
            answer = answer.withSkipHeaderRecord(skipHeaderRecord);
        }

        return answer;
    }

    private void reset() {
        marshaller = null;
        unmarshaller = null;
    }

    //region Getters/Setters

    /**
     * Gets the CSV format before applying any changes.
     * It cannot be {@code null}, the default one is {@link org.apache.commons.csv.CSVFormat#DEFAULT}.
     *
     * @return CSV format
     */
    public CSVFormat getFormat() {
        return format;
    }

    /**
     * Sets the CSV format before applying any changes.
     * If {@code null}, then {@link org.apache.commons.csv.CSVFormat#DEFAULT} is used instead.
     *
     * @param format CSV format
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat
     * @see org.apache.commons.csv.CSVFormat#DEFAULT
     */
    public CsvDataFormat setFormat(CSVFormat format) {
        this.format = (format == null) ? CSVFormat.DEFAULT : format;
        reset();
        return this;
    }

    /**
     * Sets the CSV format by name before applying any changes.
     *
     * @param name CSV format name
     * @return Current {@code CsvDataFormat}, fluent API
     * @see #setFormat(org.apache.commons.csv.CSVFormat)
     * @see org.apache.commons.csv.CSVFormat
     */
    public CsvDataFormat setFormatName(String name) {
        if (name == null) {
            setFormat(null);
        } else if ("DEFAULT".equals(name)) {
            setFormat(CSVFormat.DEFAULT);
        } else if ("RFC4180".equals(name)) {
            setFormat(CSVFormat.RFC4180);
        } else if ("EXCEL".equals(name)) {
            setFormat(CSVFormat.EXCEL);
        } else if ("TDF".equals(name)) {
            setFormat(CSVFormat.TDF);
        } else if ("MYSQL".equals(name)) {
            setFormat(CSVFormat.MYSQL);
        } else {
            throw new IllegalArgumentException("Unsupported format");
        }
        return this;
    }

    /**
     * Indicates whether or not the comment markers are disabled.
     *
     * @return {@code true} if the comment markers are disabled, {@code false} otherwise
     */
    public boolean isCommentMarkerDisabled() {
        return commentMarkerDisabled;
    }

    /**
     * Sets whether or not the comment markers are disabled.
     *
     * @param commentMarkerDisabled {@code true} if the comment markers are disabled, {@code false} otherwise
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withCommentMarker(java.lang.Character)
     */
    public CsvDataFormat setCommentMarkerDisabled(boolean commentMarkerDisabled) {
        this.commentMarkerDisabled = commentMarkerDisabled;
        reset();
        return this;
    }

    /**
     * Gets the comment marker.
     * If {@code null} then the default one of the format used.
     *
     * @return Comment marker
     */
    public Character getCommentMarker() {
        return commentMarker;
    }

    /**
     * Sets the comment marker to use.
     * If {@code null} then the default one of the format used.
     *
     * @param commentMarker Comment marker
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withCommentMarker(Character)
     */
    public CsvDataFormat setCommentMarker(Character commentMarker) {
        this.commentMarker = commentMarker;
        reset();
        return this;
    }

    /**
     * Gets the delimiter.
     * If {@code null} then the default one of the format used.
     *
     * @return Delimiter
     */
    public Character getDelimiter() {
        return delimiter;
    }

    /**
     * Sets the delimiter.
     * If {@code null} then the default one of the format used.
     *
     * @param delimiter Delimiter
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withDelimiter(char)
     */
    public CsvDataFormat setDelimiter(Character delimiter) {
        this.delimiter = delimiter;
        reset();
        return this;
    }

    /**
     * Indicates whether or not the escaping is disabled.
     *
     * @return {@code true} if the escaping is disabled, {@code false} otherwise
     */
    public boolean isEscapeDisabled() {
        return escapeDisabled;
    }

    /**
     * Sets whether or not the escaping is disabled.
     *
     * @param escapeDisabled {@code true} if the escaping is disabled, {@code false} otherwise
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withEscape(Character)
     */
    public CsvDataFormat setEscapeDisabled(boolean escapeDisabled) {
        this.escapeDisabled = escapeDisabled;
        reset();
        return this;
    }

    /**
     * Gets the escape character.
     * If {@code null} then the default one of the format used.
     *
     * @return Escape character
     */
    public Character getEscape() {
        return escape;
    }

    /**
     * Sets the escape character.
     * If {@code null} then the default one of the format used.
     *
     * @param escape Escape character
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withEscape(Character)
     */
    public CsvDataFormat setEscape(Character escape) {
        this.escape = escape;
        reset();
        return this;
    }

    /**
     * Indicates whether or not the headers are disabled.
     *
     * @return {@code true} if the headers are disabled, {@code false} otherwise
     */
    public boolean isHeaderDisabled() {
        return headerDisabled;
    }

    /**
     * Sets whether or not the headers are disabled.
     *
     * @param headerDisabled {@code true} if the headers are disabled, {@code false} otherwise
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withHeader(String...)
     */
    public CsvDataFormat setHeaderDisabled(boolean headerDisabled) {
        this.headerDisabled = headerDisabled;
        reset();
        return this;
    }

    /**
     * Gets the header.
     * If {@code null} then the default one of the format used. If empty then it will be automatically handled.
     *
     * @return Header
     */
    public String[] getHeader() {
        return header;
    }

    /**
     * Gets the header.
     * If {@code null} then the default one of the format used. If empty then it will be automatically handled.
     *
     * @param header Header
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withHeader(String...)
     */
    public CsvDataFormat setHeader(String[] header) {
        this.header = Arrays.copyOf(header, header.length);
        reset();
        return this;
    }

    /**
     * Indicates whether or not missing column names are allowed.
     * If {@code null} then the default value of the format used.
     *
     * @return Whether or not missing column names are allowed
     */
    public Boolean getAllowMissingColumnNames() {
        return allowMissingColumnNames;
    }

    /**
     * Sets whether or not missing column names are allowed.
     * If {@code null} then the default value of the format used.
     *
     * @param allowMissingColumnNames Whether or not missing column names are allowed
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withAllowMissingColumnNames(boolean)
     */
    public CsvDataFormat setAllowMissingColumnNames(Boolean allowMissingColumnNames) {
        this.allowMissingColumnNames = allowMissingColumnNames;
        reset();
        return this;
    }

    /**
     * Indicates whether or not empty lines must be ignored.
     * If {@code null} then the default value of the format used.
     *
     * @return Whether or not empty lines must be ignored
     */
    public Boolean getIgnoreEmptyLines() {
        return ignoreEmptyLines;
    }

    /**
     * Sets whether or not empty lines must be ignored.
     * If {@code null} then the default value of the format used.
     *
     * @param ignoreEmptyLines Whether or not empty lines must be ignored
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withIgnoreEmptyLines(boolean)
     */
    public CsvDataFormat setIgnoreEmptyLines(Boolean ignoreEmptyLines) {
        this.ignoreEmptyLines = ignoreEmptyLines;
        reset();
        return this;
    }

    /**
     * Indicates whether or not surrounding spaces must be ignored.
     * If {@code null} then the default value of the format used.
     *
     * @return Whether or not surrounding spaces must be ignored
     */
    public Boolean getIgnoreSurroundingSpaces() {
        return ignoreSurroundingSpaces;
    }

    /**
     * Sets whether or not surrounding spaces must be ignored.
     * If {@code null} then the default value of the format used.
     *
     * @param ignoreSurroundingSpaces Whether or not surrounding spaces must be ignored
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withIgnoreSurroundingSpaces(boolean)
     */
    public CsvDataFormat setIgnoreSurroundingSpaces(Boolean ignoreSurroundingSpaces) {
        this.ignoreSurroundingSpaces = ignoreSurroundingSpaces;
        reset();
        return this;
    }

    /**
     * Indicates whether or not the null string replacement is disabled.
     *
     * @return {@code true} if the null string replacement is disabled, {@code false} otherwise
     */
    public boolean isNullStringDisabled() {
        return nullStringDisabled;
    }

    /**
     * Sets whether or not the null string replacement is disabled.
     *
     * @param nullStringDisabled {@code true} if the null string replacement is disabled, {@code false} otherwise
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withNullString(String)
     */
    public CsvDataFormat setNullStringDisabled(boolean nullStringDisabled) {
        this.nullStringDisabled = nullStringDisabled;
        reset();
        return this;
    }

    /**
     * Gets the null string replacement.
     * If {@code null} then the default one of the format used.
     *
     * @return Null string replacement
     */
    public String getNullString() {
        return nullString;
    }

    /**
     * Sets the null string replacement.
     * If {@code null} then the default one of the format used.
     *
     * @param nullString Null string replacement
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withNullString(String)
     */
    public CsvDataFormat setNullString(String nullString) {
        this.nullString = nullString;
        reset();
        return this;
    }

    /**
     * Indicates whether or not quotes are disabled.
     *
     * @return {@code true} if quotes are disabled, {@code false} otherwise
     */
    public boolean isQuoteDisabled() {
        return quoteDisabled;
    }

    /**
     * Sets whether or not quotes are disabled
     *
     * @param quoteDisabled {@code true} if quotes are disabled, {@code false} otherwise
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withQuote(Character)
     */
    public CsvDataFormat setQuoteDisabled(boolean quoteDisabled) {
        this.quoteDisabled = quoteDisabled;
        reset();
        return this;
    }

    /**
     * Gets the quote character.
     * If {@code null} then the default one of the format used.
     *
     * @return Quote character
     */
    public Character getQuote() {
        return quote;
    }

    /**
     * Sets the quote character.
     * If {@code null} then the default one of the format used.
     *
     * @param quote Quote character
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withQuote(Character)
     */
    public CsvDataFormat setQuote(Character quote) {
        this.quote = quote;
        reset();
        return this;
    }

    /**
     * Gets the quote mode.
     * If {@code null} then the default one of the format used.
     *
     * @return Quote mode
     */
    public QuoteMode getQuoteMode() {
        return quoteMode;
    }

    /**
     * Sets the quote mode.
     * If {@code null} then the default one of the format used.
     *
     * @param quoteMode Quote mode
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withQuoteMode(org.apache.commons.csv.QuoteMode)
     */
    public CsvDataFormat setQuoteMode(QuoteMode quoteMode) {
        this.quoteMode = quoteMode;
        reset();
        return this;
    }

    /**
     * Indicates whether or not the record separator is disabled.
     *
     * @return {@code true} if the record separator disabled, {@code false} otherwise
     */
    public boolean isRecordSeparatorDisabled() {
        return recordSeparatorDisabled;
    }

    /**
     * Sets whether or not the record separator is disabled.
     *
     * @param recordSeparatorDisabled {@code true} if the record separator disabled, {@code false} otherwise
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withRecordSeparator(String)
     */
    public CsvDataFormat setRecordSeparatorDisabled(boolean recordSeparatorDisabled) {
        this.recordSeparatorDisabled = recordSeparatorDisabled;
        reset();
        return this;
    }

    /**
     * Gets the record separator.
     * If {@code null} then the default one of the format used.
     *
     * @return Record separator
     */
    public String getRecordSeparator() {
        return recordSeparator;
    }

    /**
     * Sets the record separator.
     * If {@code null} then the default one of the format used.
     *
     * @param recordSeparator Record separator
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withRecordSeparator(String)
     */
    public CsvDataFormat setRecordSeparator(String recordSeparator) {
        this.recordSeparator = recordSeparator;
        reset();
        return this;
    }

    /**
     * Indicates whether or not header record must be skipped.
     * If {@code null} then the default value of the format used.
     *
     * @return Whether or not header record must be skipped
     */
    public Boolean getSkipHeaderRecord() {
        return skipHeaderRecord;
    }

    /**
     * Sets whether or not header record must be skipped.
     * If {@code null} then the default value of the format used.
     *
     * @param skipHeaderRecord Whether or not header record must be skipped
     * @return Current {@code CsvDataFormat}, fluent API
     * @see org.apache.commons.csv.CSVFormat#withSkipHeaderRecord(boolean)
     */
    public CsvDataFormat setSkipHeaderRecord(Boolean skipHeaderRecord) {
        this.skipHeaderRecord = skipHeaderRecord;
        reset();
        return this;
    }

    /**
     * Indicates whether or not the unmarshalling should lazily load the records.
     *
     * @return {@code true} for lazy loading, {@code false} otherwise
     */
    public boolean isLazyLoad() {
        return lazyLoad;
    }

    /**
     * Indicates whether or not the unmarshalling should lazily load the records.
     *
     * @param lazyLoad {@code true} for lazy loading, {@code false} otherwise
     * @return Current {@code CsvDataFormat}, fluent API
     */
    public CsvDataFormat setLazyLoad(boolean lazyLoad) {
        this.lazyLoad = lazyLoad;
        return this;
    }

    /**
     * Indicates whether or not the unmarshalling should produce maps instead of lists.
     *
     * @return {@code true} for maps, {@code false} for lists
     */
    public boolean isUseMaps() {
        return useMaps;
    }

    /**
     * Sets whether or not the unmarshalling should produce maps instead of lists.
     *
     * @param useMaps {@code true} for maps, {@code false} for lists
     * @return Current {@code CsvDataFormat}, fluent API
     */
    public CsvDataFormat setUseMaps(boolean useMaps) {
        this.useMaps = useMaps;
        return this;
    }

    /**
     * Gets the record converter to use. If {@code null} then it will use {@link CsvDataFormat#isUseMaps()} for finding
     * the proper converter.
     *
     * @return Record converter to use
     */
    public CsvRecordConverter<?> getRecordConverter() {
        return recordConverter;
    }

    /**
     * Sets the record converter to use. If {@code null} then it will use {@link CsvDataFormat#isUseMaps()} for finding
     * the proper converter.
     *
     * @param recordConverter Record converter to use
     * @return Current {@code CsvDataFormat}, fluent API
     */
    public CsvDataFormat setRecordConverter(CsvRecordConverter<?> recordConverter) {
        this.recordConverter = recordConverter;
        return this;
    }

    //endregion

}


text:
.class Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;
.super Lcom/android/internal/util/State;
.source "WifiP2pServiceImpl.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "InactiveState"
.end annotation

# instance fields
.field final synthetic this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

# direct methods
.method constructor <init>(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)V
    .locals 0
    .param p1, "this$1"    # Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    .prologue
    .line 1206
    iput-object p1, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-direct {p0}, Lcom/android/internal/util/State;-><init>()V

    return-void
.end method

# virtual methods
.method public enter()V
    .locals 1

    .prologue
    .line 1210
    iget-object v0, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v0}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get14(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Landroid/net/wifi/p2p/WifiP2pConfig;

    move-result-object v0

    invoke-virtual {v0}, Landroid/net/wifi/p2p/WifiP2pConfig;->invalidate()V

    .line 1208
    return-void
.end method

.method public processMessage(Landroid/os/Message;)Z
    .locals 14
    .param p1, "message"    # Landroid/os/Message;

    .prologue
    .line 1216
    iget v10, p1, Landroid/os/Message;->what:I

    sparse-switch v10, :sswitch_data_0

    .line 1404
    const/4 v10, 0x0

    return v10

    .line 1219
    :sswitch_0
    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v0, Landroid/net/wifi/p2p/WifiP2pConfig;

    .line 1220
    .local v0, "config":Landroid/net/wifi/p2p/WifiP2pConfig;
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10, v0}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap2(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/net/wifi/p2p/WifiP2pConfig;)Z

    move-result v10

    if-eqz v10, :cond_0

    .line 1221
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    new-instance v11, Ljava/lang/StringBuilder;

    invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v12, "Dropping connect requeset "

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->loge(Ljava/lang/String;)V

    .line 1222
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    const v11, 0x22008

    invoke-static {v10, p1, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap22(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/os/Message;I)V

    .line 1406
    .end local v0    # "config":Landroid/net/wifi/p2p/WifiP2pConfig;
    :goto_0
    :sswitch_1
    const/4 v10, 0x1

    return v10

    .line 1226
    .restart local v0    # "config":Landroid/net/wifi/p2p/WifiP2pConfig;
    :cond_0
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v10, v10, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->this$0:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;

    const/4 v11, 0x0

    invoke-static {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;->-set0(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;Z)Z

    .line 1227
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get19(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/WifiNative;

    move-result-object v10

    invoke-virtual {v10}, Lcom/android/server/wifi/WifiNative;->p2pStopFind()Z

    .line 1228
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10, v0}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap3(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/net/wifi/p2p/WifiP2pConfig;)Z

    move-result v10

    if-eqz v10, :cond_1

    .line 1229
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v11, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get4(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$GroupNegotiationState;

    move-result-object v11

    invoke-static {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap34(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Lcom/android/internal/util/IState;)V

    .line 1233
    :goto_1
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10, v0}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-set1(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/net/wifi/p2p/WifiP2pConfig;)Landroid/net/wifi/p2p/WifiP2pConfig;

    .line 1234
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get11(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Landroid/net/wifi/p2p/WifiP2pDeviceList;

    move-result-object v10

    iget-object v11, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get14(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Landroid/net/wifi/p2p/WifiP2pConfig;

    move-result-object v11

    iget-object v11, v11, Landroid/net/wifi/p2p/WifiP2pConfig;->deviceAddress:Ljava/lang/String;

    const/4 v12, 0x1

    invoke-virtual {v10, v11, v12}, Landroid/net/wifi/p2p/WifiP2pDeviceList;->updateStatus(Ljava/lang/String;I)V

    .line 1235
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap30(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)V

    .line 1236
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    const v11, 0x22009

    invoke-static {v10, p1, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap22(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/os/Message;I)V

    goto :goto_0

    .line 1231
    :cond_1
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v11, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get13(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$ProvisionDiscoveryState;

    move-result-object v11

    invoke-static {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap34(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Lcom/android/internal/util/IState;)V

    goto :goto_1

    .line 1239
    .end local v0    # "config":Landroid/net/wifi/p2p/WifiP2pConfig;
    :sswitch_2
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get19(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/WifiNative;

    move-result-object v10

    invoke-virtual {v10}, Lcom/android/server/wifi/WifiNative;->p2pStopFind()Z

    move-result v10

    if-eqz v10, :cond_2

    .line 1242
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get19(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/WifiNative;

    move-result-object v10

    invoke-virtual {v10}, Lcom/android/server/wifi/WifiNative;->p2pFlush()Z

    .line 1243
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v10, v10, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->this$0:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;

    const/4 v11, 0x0

    invoke-static {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;->-set9(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;Ljava/lang/String;)Ljava/lang/String;

    .line 1244
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    const v11, 0x22006

    invoke-static {v10, p1, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap22(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/os/Message;I)V

    goto :goto_0

    .line 1246
    :cond_2
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    const v11, 0x22005

    .line 1247
    const/4 v12, 0x0

    .line 1246
    invoke-static {v10, p1, v11, v12}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap23(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/os/Message;II)V

    goto/16 :goto_0

    .line 1251
    :sswitch_3
    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v0, Landroid/net/wifi/p2p/WifiP2pConfig;

    .line 1252
    .restart local v0    # "config":Landroid/net/wifi/p2p/WifiP2pConfig;
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10, v0}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap2(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/net/wifi/p2p/WifiP2pConfig;)Z

    move-result v10

    if-eqz v10, :cond_3

    .line 1253
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    new-instance v11, Ljava/lang/StringBuilder;

    invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v12, "Dropping GO neg request "

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->loge(Ljava/lang/String;)V

    goto/16 :goto_0

    .line 1256
    :cond_3
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10, v0}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-set1(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/net/wifi/p2p/WifiP2pConfig;)Landroid/net/wifi/p2p/WifiP2pConfig;

    .line 1257
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v10, v10, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->this$0:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;

    const/4 v11, 0x0

    invoke-static {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;->-set0(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;Z)Z

    .line 1258
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v10, v10, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->this$0:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;

    const/4 v11, 0x0

    invoke-static {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;->-set7(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;Z)Z

    .line 1259
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v11, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get17(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$UserAuthorizingNegotiationRequestState;

    move-result-object v11

    invoke-static {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap34(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Lcom/android/internal/util/IState;)V

    goto/16 :goto_0

    .line 1262
    .end local v0    # "config":Landroid/net/wifi/p2p/WifiP2pConfig;
    :sswitch_4
    iget-object v1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v1, Landroid/net/wifi/p2p/WifiP2pGroup;

    .line 1263
    .local v1, "group":Landroid/net/wifi/p2p/WifiP2pGroup;
    invoke-virtual {v1}, Landroid/net/wifi/p2p/WifiP2pGroup;->getOwner()Landroid/net/wifi/p2p/WifiP2pDevice;

    move-result-object v7

    .line 1265
    .local v7, "owner":Landroid/net/wifi/p2p/WifiP2pDevice;
    if-nez v7, :cond_4

    .line 1266
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    const-string/jumbo v11, "Ignored invitation from null owner"

    invoke-virtual {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->loge(Ljava/lang/String;)V

    goto/16 :goto_0

    .line 1270
    :cond_4
    new-instance v0, Landroid/net/wifi/p2p/WifiP2pConfig;

    invoke-direct {v0}, Landroid/net/wifi/p2p/WifiP2pConfig;-><init>()V

    .line 1271
    .restart local v0    # "config":Landroid/net/wifi/p2p/WifiP2pConfig;
    invoke-virtual {v1}, Landroid/net/wifi/p2p/WifiP2pGroup;->getOwner()Landroid/net/wifi/p2p/WifiP2pDevice;

    move-result-object v10

    iget-object v10, v10, Landroid/net/wifi/p2p/WifiP2pDevice;->deviceAddress:Ljava/lang/String;

    iput-object v10, v0, Landroid/net/wifi/p2p/WifiP2pConfig;->deviceAddress:Ljava/lang/String;

    .line 1273
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10, v0}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap2(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/net/wifi/p2p/WifiP2pConfig;)Z

    move-result v10

    if-eqz v10, :cond_5

    .line 1274
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    new-instance v11, Ljava/lang/StringBuilder;

    invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v12, "Dropping invitation request "

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->loge(Ljava/lang/String;)V

    goto/16 :goto_0

    .line 1277
    :cond_5
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10, v0}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-set1(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/net/wifi/p2p/WifiP2pConfig;)Landroid/net/wifi/p2p/WifiP2pConfig;

    .line 1281
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get11(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Landroid/net/wifi/p2p/WifiP2pDeviceList;

    move-result-object v10

    iget-object v11, v7, Landroid/net/wifi/p2p/WifiP2pDevice;->deviceAddress:Ljava/lang/String;

    invoke-virtual {v10, v11}, Landroid/net/wifi/p2p/WifiP2pDeviceList;->get(Ljava/lang/String;)Landroid/net/wifi/p2p/WifiP2pDevice;

    move-result-object v7

    if-eqz v7, :cond_6

    .line 1282
    invoke-virtual {v7}, Landroid/net/wifi/p2p/WifiP2pDevice;->wpsPbcSupported()Z

    move-result v10

    if-eqz v10, :cond_7

    .line 1283
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get14(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Landroid/net/wifi/p2p/WifiP2pConfig;

    move-result-object v10

    iget-object v10, v10, Landroid/net/wifi/p2p/WifiP2pConfig;->wps:Landroid/net/wifi/WpsInfo;

    const/4 v11, 0x0

    iput v11, v10, Landroid/net/wifi/WpsInfo;->setup:I

    .line 1291
    :cond_6
    :goto_2
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v10, v10, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->this$0:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;

    const/4 v11, 0x0

    invoke-static {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;->-set0(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;Z)Z

    .line 1292
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v10, v10, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->this$0:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;

    const/4 v11, 0x1

    invoke-static {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;->-set7(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;Z)Z

    .line 1293
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v11, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get15(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$UserAuthorizingInviteRequestState;

    move-result-object v11

    invoke-static {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap34(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Lcom/android/internal/util/IState;)V

    goto/16 :goto_0

    .line 1284
    :cond_7
    invoke-virtual {v7}, Landroid/net/wifi/p2p/WifiP2pDevice;->wpsKeypadSupported()Z

    move-result v10

    if-eqz v10, :cond_8

    .line 1285
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get14(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Landroid/net/wifi/p2p/WifiP2pConfig;

    move-result-object v10

    iget-object v10, v10, Landroid/net/wifi/p2p/WifiP2pConfig;->wps:Landroid/net/wifi/WpsInfo;

    const/4 v11, 0x2

    iput v11, v10, Landroid/net/wifi/WpsInfo;->setup:I

    goto :goto_2

    .line 1286
    :cond_8
    invoke-virtual {v7}, Landroid/net/wifi/p2p/WifiP2pDevice;->wpsDisplaySupported()Z

    move-result v10

    if-eqz v10, :cond_6

    .line 1287
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get14(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Landroid/net/wifi/p2p/WifiP2pConfig;

    move-result-object v10

    iget-object v10, v10, Landroid/net/wifi/p2p/WifiP2pConfig;->wps:Landroid/net/wifi/WpsInfo;

    const/4 v11, 0x1

    iput v11, v10, Landroid/net/wifi/WpsInfo;->setup:I

    goto :goto_2

    .line 1304
    .end local v0    # "config":Landroid/net/wifi/p2p/WifiP2pConfig;
    .end local v1    # "group":Landroid/net/wifi/p2p/WifiP2pGroup;
    .end local v7    # "owner":Landroid/net/wifi/p2p/WifiP2pDevice;
    :sswitch_5
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v10, v10, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->this$0:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;

    const/4 v11, 0x1

    invoke-static {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;->-set0(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;Z)Z

    .line 1305
    iget v5, p1, Landroid/os/Message;->arg1:I

    .line 1306
    .local v5, "netId":I
    const/4 v9, 0x0

    .line 1307
    .local v9, "ret":Z
    const/4 v10, -0x2

    if-ne v5, v10, :cond_a

    .line 1309
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get5(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Landroid/net/wifi/p2p/WifiP2pGroupList;

    move-result-object v10

    iget-object v11, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v11, v11, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->this$0:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;

    invoke-static {v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;->-get19(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;)Landroid/net/wifi/p2p/WifiP2pDevice;

    move-result-object v11

    iget-object v11, v11, Landroid/net/wifi/p2p/WifiP2pDevice;->deviceAddress:Ljava/lang/String;

    invoke-virtual {v10, v11}, Landroid/net/wifi/p2p/WifiP2pGroupList;->getNetworkId(Ljava/lang/String;)I

    move-result v5

    .line 1310
    const/4 v10, -0x1

    if-eq v5, v10, :cond_9

    .line 1311
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get19(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/WifiNative;

    move-result-object v10

    invoke-virtual {v10, v5}, Lcom/android/server/wifi/WifiNative;->p2pGroupAdd(I)Z

    move-result v9

    .line 1319
    .local v9, "ret":Z
    :goto_3
    if-eqz v9, :cond_b

    .line 1320
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    const v11, 0x2200f

    invoke-static {v10, p1, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap22(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/os/Message;I)V

    .line 1321
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v11, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get4(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$GroupNegotiationState;

    move-result-object v11

    invoke-static {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap34(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Lcom/android/internal/util/IState;)V

    goto/16 :goto_0

    .line 1313
    .local v9, "ret":Z
    :cond_9
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get19(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/WifiNative;

    move-result-object v10

    const/4 v11, 0x1

    invoke-virtual {v10, v11}, Lcom/android/server/wifi/WifiNative;->p2pGroupAdd(Z)Z

    move-result v9

    .local v9, "ret":Z
    goto :goto_3

    .line 1316
    .local v9, "ret":Z
    :cond_a
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get19(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/WifiNative;

    move-result-object v10

    const/4 v11, 0x0

    invoke-virtual {v10, v11}, Lcom/android/server/wifi/WifiNative;->p2pGroupAdd(Z)Z

    move-result v9

    .local v9, "ret":Z
    goto :goto_3

    .line 1323
    :cond_b
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    const v11, 0x2200e

    .line 1324
    const/4 v12, 0x0

    .line 1323
    invoke-static {v10, p1, v11, v12}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap23(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/os/Message;II)V

    goto/16 :goto_0

    .line 1329
    .end local v5    # "netId":I
    .end local v9    # "ret":Z
    :sswitch_6
    iget-object v11, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v10, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v10, Landroid/net/wifi/p2p/WifiP2pGroup;

    invoke-static {v11, v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-set0(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/net/wifi/p2p/WifiP2pGroup;)Landroid/net/wifi/p2p/WifiP2pGroup;

    .line 1333
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get1(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Landroid/net/wifi/p2p/WifiP2pGroup;

    move-result-object v10

    invoke-virtual {v10}, Landroid/net/wifi/p2p/WifiP2pGroup;->getNetworkId()I

    move-result v10

    const/4 v11, -0x2

    if-ne v10, v11, :cond_c

    .line 1334
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v10, v10, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->this$0:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;

    const/4 v11, 0x0

    invoke-static {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;->-set0(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl;Z)Z

    .line 1335
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10, p1}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap12(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/os/Message;)V

    .line 1336
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v11, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get4(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$GroupNegotiationState;

    move-result-object v11

    invoke-static {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap34(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Lcom/android/internal/util/IState;)V

    goto/16 :goto_0

    .line 1338
    :cond_c
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    new-instance v11, Ljava/lang/StringBuilder;

    invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v12, "Unexpected group creation, remove "

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    iget-object v12, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v12}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get1(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Landroid/net/wifi/p2p/WifiP2pGroup;

    move-result-object v12

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->loge(Ljava/lang/String;)V

    .line 1339
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get19(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/WifiNative;

    move-result-object v10

    iget-object v11, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get1(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Landroid/net/wifi/p2p/WifiP2pGroup;

    move-result-object v11

    invoke-virtual {v11}, Landroid/net/wifi/p2p/WifiP2pGroup;->getInterface()Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v10, v11}, Lcom/android/server/wifi/WifiNative;->p2pGroupRemove(Ljava/lang/String;)Z

    goto/16 :goto_0

    .line 1344
    :sswitch_7
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get19(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/WifiNative;

    move-result-object v10

    invoke-virtual {v10}, Lcom/android/server/wifi/WifiNative;->p2pFlush()Z

    .line 1345
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get19(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/WifiNative;

    move-result-object v10

    const/4 v11, 0x1

    const/16 v12, 0x1f4

    const/16 v13, 0x1f4

    invoke-virtual {v10, v11, v12, v13}, Lcom/android/server/wifi/WifiNative;->p2pExtListen(ZII)Z

    move-result v10

    if-eqz v10, :cond_d

    .line 1346
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    const v11, 0x22043

    invoke-static {v10, p1, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap22(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/os/Message;I)V

    goto/16 :goto_0

    .line 1348
    :cond_d
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    const v11, 0x22042

    invoke-static {v10, p1, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap22(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/os/Message;I)V

    goto/16 :goto_0

    .line 1353
    :sswitch_8
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get19(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/WifiNative;

    move-result-object v10

    const/4 v11, 0x0

    const/4 v12, 0x0

    const/4 v13, 0x0

    invoke-virtual {v10, v11, v12, v13}, Lcom/android/server/wifi/WifiNative;->p2pExtListen(ZII)Z

    move-result v10

    if-eqz v10, :cond_e

    .line 1354
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    const v11, 0x22046

    invoke-static {v10, p1, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap22(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/os/Message;I)V

    .line 1358
    :goto_4
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get19(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/WifiNative;

    move-result-object v10

    invoke-virtual {v10}, Lcom/android/server/wifi/WifiNative;->p2pFlush()Z

    goto/16 :goto_0

    .line 1356
    :cond_e
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    const v11, 0x22045

    invoke-static {v10, p1, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap22(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/os/Message;I)V

    goto :goto_4

    .line 1361
    :sswitch_9
    iget-object v8, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v8, Landroid/os/Bundle;

    .line 1362
    .local v8, "p2pChannels":Landroid/os/Bundle;
    const-string/jumbo v10, "lc"

    const/4 v11, 0x0

    invoke-virtual {v8, v10, v11}, Landroid/os/Bundle;->getInt(Ljava/lang/String;I)I

    move-result v4

    .line 1363
    .local v4, "lc":I
    const-string/jumbo v10, "oc"

    const/4 v11, 0x0

    invoke-virtual {v8, v10, v11}, Landroid/os/Bundle;->getInt(Ljava/lang/String;I)I

    move-result v6

    .line 1365
    .local v6, "oc":I
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get19(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/WifiNative;

    move-result-object v10

    invoke-virtual {v10, v4, v6}, Lcom/android/server/wifi/WifiNative;->p2pSetChannel(II)Z

    move-result v10

    if-eqz v10, :cond_f

    .line 1366
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    const v11, 0x22049

    invoke-static {v10, p1, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap22(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/os/Message;I)V

    goto/16 :goto_0

    .line 1368
    :cond_f
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    const v11, 0x22048

    invoke-static {v10, p1, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap22(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/os/Message;I)V

    goto/16 :goto_0

    .line 1372
    .end local v4    # "lc":I
    .end local v6    # "oc":I
    .end local v8    # "p2pChannels":Landroid/os/Bundle;
    :sswitch_a
    const/4 v3, 0x0

    .line 1374
    .local v3, "handoverSelect":Ljava/lang/String;
    iget-object v10, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    if-eqz v10, :cond_10

    .line 1375
    iget-object v10, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v10, Landroid/os/Bundle;

    .line 1376
    const-string/jumbo v11, "android.net.wifi.p2p.EXTRA_HANDOVER_MESSAGE"

    .line 1375
    invoke-virtual {v10, v11}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    .line 1379
    .end local v3    # "handoverSelect":Ljava/lang/String;
    :cond_10
    if-eqz v3, :cond_11

    .line 1380
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get19(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/WifiNative;

    move-result-object v10

    invoke-virtual {v10, v3}, Lcom/android/server/wifi/WifiNative;->initiatorReportNfcHandover(Ljava/lang/String;)Z

    move-result v10

    .line 1379
    if-eqz v10, :cond_11

    .line 1381
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    const v11, 0x22050

    invoke-static {v10, p1, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap22(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/os/Message;I)V

    .line 1382
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v11, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get3(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$GroupCreatingState;

    move-result-object v11

    invoke-static {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap34(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Lcom/android/internal/util/IState;)V

    goto/16 :goto_0

    .line 1384
    :cond_11
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    const v11, 0x22051

    invoke-static {v10, p1, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap22(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/os/Message;I)V

    goto/16 :goto_0

    .line 1388
    :sswitch_b
    const/4 v2, 0x0

    .line 1390
    .local v2, "handoverRequest":Ljava/lang/String;
    iget-object v10, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    if-eqz v10, :cond_12

    .line 1391
    iget-object v10, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v10, Landroid/os/Bundle;

    .line 1392
    const-string/jumbo v11, "android.net.wifi.p2p.EXTRA_HANDOVER_MESSAGE"

    .line 1391
    invoke-virtual {v10, v11}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 1395
    .end local v2    # "handoverRequest":Ljava/lang/String;
    :cond_12
    if-eqz v2, :cond_13

    .line 1396
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v10}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get19(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/WifiNative;

    move-result-object v10

    invoke-virtual {v10, v2}, Lcom/android/server/wifi/WifiNative;->responderReportNfcHandover(Ljava/lang/String;)Z

    move-result v10

    .line 1395
    if-eqz v10, :cond_13

    .line 1397
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    const v11, 0x22050

    invoke-static {v10, p1, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap22(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/os/Message;I)V

    .line 1398
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    iget-object v11, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    invoke-static {v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-get3(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;)Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$GroupCreatingState;

    move-result-object v11

    invoke-static {v10, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap34(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Lcom/android/internal/util/IState;)V

    goto/16 :goto_0

    .line 1400
    :cond_13
    iget-object v10, p0, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine$InactiveState;->this$1:Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;

    const v11, 0x22051

    invoke-static {v10, p1, v11}, Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;->-wrap22(Lcom/android/server/wifi/p2p/WifiP2pServiceImpl$P2pStateMachine;Landroid/os/Message;I)V

    goto/16 :goto_0

    .line 1216
    :sswitch_data_0
    .sparse-switch
        0x22004 -> :sswitch_2
        0x22007 -> :sswitch_0
        0x2200d -> :sswitch_5
        0x22041 -> :sswitch_7
        0x22044 -> :sswitch_8
        0x22047 -> :sswitch_9
        0x2204e -> :sswitch_a
        0x2204f -> :sswitch_b
        0x24017 -> :sswitch_3
        0x2401d -> :sswitch_6
        0x2401f -> :sswitch_4
        0x24021 -> :sswitch_1
        0x24023 -> :sswitch_1
        0x24024 -> :sswitch_1
    .end sparse-switch
.end method

redpajama_set_name: RedPajamaGithub


text:
user=$1
file=$2

function usage() {
    echo "usage %prog user"
    echo ""
    echo "  Dumps the users profile pic"
}

if [ $(id -u "$user" > /dev/null) ]; then
    >&2 echo "ERROR: Invalid username"
fi

dscl . -read /Users/${user} JPEGPhoto | tail -1 | xxd -r -p


text:
	#pragma import on
#endif

PP_Begin_Namespace_PowerPlant

class LInPlaceEditField;

// ---------------------------------------------------------------------------

class LEditableOutlineItem : public LOutlineItem,
							 public LPeriodical {
public:
							LEditableOutlineItem();
	virtual					~LEditableOutlineItem();

	// in-place editing accessors

	virtual Boolean			CanDoInPlaceEdit( const STableCell& inCell );

	virtual void			StartInPlaceEdit( const STableCell& inCell );

	LInPlaceEditField*		GetEditField() const
									{ return mEditField; }

	// in-place editing implementation

protected:
	virtual void			SingleClick(
									const STableCell&		inCell,
									const SMouseDownEvent&	inMouseDown,
									const SOutlineDrawContents&	inDrawContents,
									Boolean					inHitText);

	virtual void			SpendTime( const EventRecord& inMacEvent );

	virtual void			ConfigureInPlaceEdit(
									const STableCell&		inCell,
									ResIDT&					outTextTraitsID,
									SInt16&					outMaxChars,
									UInt8&					outAttributes,
									TEKeyFilterFunc&		outKeyFilter);

	virtual void			StopInPlaceEdit();

	virtual void			PrepareDrawContents(
									const STableCell&		inCell,
									SOutlineDrawContents&	ioDrawContents);

	// data members

protected:
	LInPlaceEditField*		mEditField;						// the edit field we've created (if any)

	// class variables

protected:
	static UInt32			sInPlaceEditTickCount;			// time to start editing (if single-clicked)
	static Rect				sInPlaceEditTextFrame;			// where editing will take place
	static STableCell		sInPlaceEditCell;				// cell which is being edited

	friend class LOutlineEditFieldWatcher;
};

PP_End_Namespace_PowerPlant

#if PP_Uses_Pragma_Import
	#pragma import reset
#endif

#endif


text:
@interface PodsDummy_GMIRCClient : NSObject
@end
@implementation PodsDummy_GMIRCClient
@end


text:
class nnet
{
 public:
  nnet(int inputnum,int hiddennum,int outputnum,int patternnum);
  ~nnet();
  void setInData(const int &pnum,const int &i,const double &value);
  void setTeachData(const int &pnum,const int &i,const double &value);
  void setPredictData(const int &i,const double &value);
  void train();
  void predict();

 private:
  // parameter
  int inputnum;
  int hiddennum;
  int outputnum;
  int patternnum;
  double **X_i;         // X input
  double *X_h;          // X hidden
  double *X_o;          // X output

 // foward propagation
  double **W_itoh;      // weight input to hidden
  double **W_htoo;      // weight hidden to output
  double *bias_h;       // bias hidden layer
  double *bias_o;       // bias output layer

  // back propagation
  double **T_signal;      // teach signal
  double **W_itoh_prev;   // weight input to hidden
  double **W_htoo_prev;   // weight hidden to output
  double *bias_h_prev;    // bias hidden layer
  double *bias_o_prev;    // bias output layer
  double *dwih;           // 隠れ層での学習信号
  double *dwho;           // 出力層での学習信号

  // const parameter
  const double Eta;
  const double Alpha;
  const double ErrorEv;
  const double Rlow;
  const double Rhigh;
  const int MaxGen;

  #define activationFunc(x) (1/(1+exp(-(x))))   // -xではNG -(x) とすること
  #define activationFunc_diff(x) (x*(1-x))
  #define urand() ((double) rand()/RAND_MAX * (Rhigh - Rlow) + Rlow)

  // functions
  void foward_propagation(const int &pnum);
  void back_propagation(const int &pnum);
  double random() ;

};

#endif


text:
import styled from 'styled-components'

import type { TActive } from '@/spec'
import Img from '@/Img'
import css, { theme } from '@/utils/css'

export const Wrapper = styled.div`
  ${css.flex('align-center')};
  filter: ${theme('modal.subPanelShadow')};
  background: ${theme('modal.bg')};
  padding: 0 28px;
  height: 50px;
`
export const WechatLogo = styled(Img)`
  ${css.size(18)};
  margin-right: 10px;
  filter: saturate(0.6);
`
export const Title = styled.div`
  ${css.flex('align-center')};
  font-size: 15px;
  color: ${theme('thread.articleTitle')};
`
export const SelectWrapper = styled.div`
  ${css.flex('align-center')};
`
export const Letter = styled.div<TActive>`
  ${css.flex('align-both')};
  color: ${({ $active }) =>
    $active ? '#139c9e' : theme('thread.articleDigest')};
  font-size: ${({ $active }) => ($active ? '15px' : '14px')};
  font-weight: ${({ $active }) => ($active ? 'bold' : 'normal')};
  margin-left: 13px;
  font-weight: bold;

  &:hover {
    cursor: pointer;
    color: #139c9e;
  }
`


text:
import { useEffect } from 'react'

describe('cleanup tests', () => {
  runForRenderers(
    ['default/pure', 'dom/pure', 'native/pure', 'server/hydrated/pure'],
    ({ renderHook, cleanup, addCleanup, removeCleanup }) => {
      test('should flush effects on cleanup', async () => {
        let cleanupCalled = false

        const useHookWithCleanup = () => {
          useEffect(() => {
            return () => {
              cleanupCalled = true
            }
          })
        }

        renderHook(() => useHookWithCleanup())

        await cleanup()

        expect(cleanupCalled).toBe(true)
      })

      test('should cleanup all rendered hooks', async () => {
        const cleanupCalled: boolean[] = []
        const useHookWithCleanup = (id: number) => {
          useEffect(() => {
            return () => {
              cleanupCalled[id] = true
            }
          })
        }

        renderHook(() => useHookWithCleanup(1))
        renderHook(() => useHookWithCleanup(2))

        await cleanup()

        expect(cleanupCalled[1]).toBe(true)
        expect(cleanupCalled[2]).toBe(true)
      })

      test('should call cleanups in reverse order', async () => {
        const callSequence: string[] = []
        addCleanup(() => {
          callSequence.push('cleanup')
        })
        addCleanup(() => {
          callSequence.push('another cleanup')
        })
        const useHookWithCleanup = () => {
          useEffect(() => {
            return () => {
              callSequence.push('unmount')
            }
          })
        }
        renderHook(() => useHookWithCleanup())

        await cleanup()

        expect(callSequence).toEqual(['unmount', 'another cleanup', 'cleanup'])
      })

      test('should wait for async cleanup', async () => {
        const callSequence: string[] = []
        addCleanup(() => {
          callSequence.push('cleanup')
        })
        addCleanup(async () => {
          await new Promise((resolve) => setTimeout(resolve, 10))
          callSequence.push('another cleanup')
        })
        const useHookWithCleanup = () => {
          useEffect(() => {
            return () => {
              callSequence.push('unmount')
            }
          })
        }
        renderHook(() => useHookWithCleanup())

        await cleanup()

        expect(callSequence).toEqual(['unmount', 'another cleanup', 'cleanup'])
      })

      test('should remove cleanup using removeCleanup', async () => {
        const callSequence: string[] = []
        addCleanup(() => {
          callSequence.push('cleanup')
        })
        const anotherCleanup = () => {
          callSequence.push('another cleanup')
        }
        addCleanup(anotherCleanup)
        const useHookWithCleanup = () => {
          useEffect(() => {
            return () => {
              callSequence.push('unmount')
            }
          })
        }
        renderHook(() => useHookWithCleanup())

        removeCleanup(anotherCleanup)

        await cleanup()

        expect(callSequence).toEqual(['unmount', 'cleanup'])
      })

      test('should remove cleanup using returned handler', async () => {
        const callSequence: string[] = []
        addCleanup(() => {
          callSequence.push('cleanup')
        })
        const remove = addCleanup(() => {
          callSequence.push('another cleanup')
        })
        const useHookWithCleanup = () => {
          useEffect(() => {
            return () => {
              callSequence.push('unmount')
            }
          })
        }
        renderHook(() => useHookWithCleanup())

        remove()

        await cleanup()

        expect(callSequence).toEqual(['unmount', 'cleanup'])
      })
    }
  )

  runForRenderers(['server/pure'], ({ renderHook, cleanup }) => {
    test('should only cleanup hydrated hooks', async () => {
      const cleanups: Record<string, boolean> = {
        ssr: false,
        hydrated: false
      }

      const useHookWithCleanup = (name: string) => {
        useEffect(() => {
          return () => {
            cleanups[name] = true
          }
        })
      }

      renderHook(() => useHookWithCleanup('ssr'))
      const { hydrate } = renderHook(() => useHookWithCleanup('hydrated'))

      hydrate()

      await cleanup()

      expect(cleanups.ssr).toBe(false)
      expect(cleanups.hydrated).toBe(true)
    })
  })
})


text:
<?php
 class HowToController extends AppController {
     public $uses = ['HowTo'];
     public function index() {
         $docs = $this->mCusApi->resource('static_pages')->request('/getByDocKey', ['data' => ['doc_key' =>
             'howToGuides']]);
         $this->set('docs', $docs['docs']);
     }
 }


text:
Node Cal NSS Student Workspace

This is a project completed at NSS.

The goal was to practice Node.js with ES6 and TDD by creating an exact replica of the UNIX command line app 'cal.'
It uses Zeller's algorithm to generate a ASCII calendar and correctly handle leap years etc. Users can choose to lookup a specific month or year.

The project implements unit and integration tests with Mocha and Chai.

This is the command line version of the app, and you're welcome to fork and pull it down to test it out.
(You will need to do an npm install to get lodash) then just run `node cal.js`

However, I've used it as a module on a heroku-deployed student project so you can see the functionality here:
https://calajp.herokuapp.com/cal/


text:
package ca.ualberta.cs.cmput301t02project.test;

import java.util.ArrayList;

import ca.ualberta.cs.cmput301t02project.activity.CreateCommentActivity;
import ca.ualberta.cs.cmput301t02project.activity.MainMenuActivity;
import ca.ualberta.cs.cmput301t02project.model.CommentModel;
import ca.ualberta.cs.cmput301t02project.model.GPSLocation;
import ca.ualberta.cs.cmput301t02project.model.TopLevelCommentList;
import ca.ualberta.cs.cmput301t02project.model.User;
import android.app.Activity;
import android.app.Instrumentation;
import android.location.Location;
import android.test.ActivityInstrumentationTestCase2;
import android.util.Log;
import android.widget.Button;
import android.widget.EditText;

public class CreateCommentActivityTest extends ActivityInstrumentationTestCase2<MainMenuActivity> {

	Activity activity;
	String username = "default";
	String text = "the comment";

	protected void setUp() throws Exception {
		super.setUp();
		User.login(username, getInstrumentation().getTargetContext());
		activity = getActivity();
	}

	public void initializeComment() {
		Instrumentation.ActivityMonitor activityMonitor = getInstrumentation().addMonitor(CreateCommentActivity.class.getName(), null , false);
		activity.runOnUiThread(new Runnable() {
			@Override
			public void run() {
				Button button1 = (Button) activity.findViewById(ca.ualberta.cs.cmput301t02project.R.id.create);
				assertNotNull(button1);
				button1.performClick();
			}
		});

		getInstrumentation().waitForIdleSync();
		CreateCommentActivity childActivity = (CreateCommentActivity) getInstrumentation().waitForMonitorWithTimeout(activityMonitor, 5);
		final EditText edit = (EditText) childActivity.findViewById(ca.ualberta.cs.cmput301t02project.R.id.create_text);
		final Button button = (Button) childActivity.findViewById(ca.ualberta.cs.cmput301t02project.R.id.create_post);
		assertNotNull(edit);
		assertNotNull(button);
		childActivity.runOnUiThread(new Runnable() {
			@Override
			public void run() {
				edit.setText(text);
				button.performClick();
			}
		});
		getInstrumentation().waitForIdleSync();
	}

	public void initializeCustomLocationComment(final int latInt, final int longInt) {
		Instrumentation.ActivityMonitor activityMonitor = getInstrumentation().addMonitor(CreateCommentActivity.class.getName(), null , false);
		activity.runOnUiThread(new Runnable() {
			@Override
			public void run() {
				Button button1 = (Button) activity.findViewById(ca.ualberta.cs.cmput301t02project.R.id.create);
				assertNotNull(button1);
				button1.performClick();
			}
		});

		getInstrumentation().waitForIdleSync();
		CreateCommentActivity childActivity = (CreateCommentActivity) getInstrumentation().waitForMonitorWithTimeout(activityMonitor, 5);
		final EditText latitude = (EditText) childActivity.findViewById(ca.ualberta.cs.cmput301t02project.R.id.latitude_box);
		final EditText longitude = (EditText) childActivity.findViewById(ca.ualberta.cs.cmput301t02project.R.id.longitude_box);
		final EditText edit = (EditText) childActivity.findViewById(ca.ualberta.cs.cmput301t02project.R.id.create_text);
		final Button button = (Button) childActivity.findViewById(ca.ualberta.cs.cmput301t02project.R.id.create_post);
		assertNotNull(edit);
		assertNotNull(button);
		assertNotNull(latitude);
		assertNotNull(longitude);
		childActivity.runOnUiThread(new Runnable() {
			@Override
			public void run() {
				latitude.setText(latInt+"");
				longitude.setText(longInt+"");
				edit.setText("customLocationTest");
				button.performClick();
			}
		});
		getInstrumentation().waitForIdleSync();
	}

	public CreateCommentActivityTest() {
		super(MainMenuActivity.class);
		// TODO Auto-generated constructor stub
	}

	/* Test for use case 3 */
	public void testCreateTopLevelComment() throws Exception {
		initializeComment();
		Thread.sleep(2000);
		ArrayList<CommentModel> list = User.getUser().getMyComments().getList();
		boolean hasText = false;
		boolean hasUsername = false;
		boolean isTopLevel = false;
		for (int i=0; i<list.size(); i++){
			if (list.get(i).toString().contains(text)) {
				if (list.get(i).toString().contains(username)) {
					if (list.get(i).isTopLevelComment()) {
						hasText = true;
						hasUsername = true;
						isTopLevel = true;
					}
				}
			}
		}

		assertTrue("list comment should have same text", hasText);
		assertTrue("list comment should have same username", hasUsername);
		assertTrue("comment should be marked as top level", isTopLevel);
	}

	/* Test for use case 17 */
	public void testGeoLocationOfComment() throws Exception {
		initializeComment();
		Thread.sleep(2000);
		ArrayList<CommentModel> list = User.getUser().getMyComments().getList();
		int len = list.size();
		assertEquals("comment lat should be equal to gps lat", GPSLocation.getInstance().getLocation().getLatitude(), list.get(len-1).getLocation().getLatitude());
		assertEquals("comment long should be equal to gps long", GPSLocation.getInstance().getLocation().getLongitude(), list.get(len-1).getLocation().getLongitude());

	}

	/* Test for use case 14 */
	public void testShareComment () throws Exception {
		int size1 = TopLevelCommentList.getInstance(activity.getApplicationContext()).getList().size();
		initializeComment();
		Thread.sleep(2000);
		int size2 = TopLevelCommentList.getInstance(activity.getApplicationContext()).getList().size();
		size1++;
        assertEquals("Size of top level comment list should be increased by 1 when new comment is added", size1, size2);
    }

	public void testCreateCustomLocationComment() throws Exception {
		int latInt = 57;
		int longInt = 113;
		initializeCustomLocationComment(latInt, longInt);
		Thread.sleep(2000);
		ArrayList<CommentModel> list = User.getUser().getMyComments().getList();
		boolean hasText = false;
		boolean sameLong = false;
		boolean sameLat = false;
		for (int i=0; i<list.size(); i++){
			if (list.get(i).toString().contains("customLocationTest")) {
				int comLat = (int) list.get(i).getLocation().getLatitude();
				int comLong = (int) list.get(i).getLocation().getLongitude();
				if (comLat == latInt) {
					if (comLong == longInt) {
						hasText = true;
						sameLong = true;
						sameLat = true;
					}
				}
			}
		}
		assertTrue("list comment should have same text", hasText);
		assertTrue("list comment should have custom lat", sameLat);
		assertTrue("list comment should have custom long", sameLong);
	}

	/* test to see if user is being pushed to server after update */
	public void testPushUser() throws Exception {
		int size1 = User.getUser().getMyCommentIds().size();
		initializeComment();
		Thread.sleep(2000);
		User.login(username, activity.getApplicationContext());
		int size2 = User.getUser().getMyCommentIds().size();
		size1++;
		assertEquals("Number of comments by user pulled from the server after adding comment should be increased by 1",size1, size2);
	}

}


text:
package desmoj.core.simulator;

import java.util.EnumMap;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.TimeUnit;

/**
 * @author goebel
 *
 */
public class SingleUnitTimeFormatter implements TimeFormatter {
	private static Map<TimeUnit, Map<TimeUnit, Long>> timeConstants = new EnumMap<TimeUnit, Map<TimeUnit, Long>>(
			TimeUnit.class);

	static {

		Map<TimeUnit, Long> dayConstants = new EnumMap<TimeUnit, Long>(
				TimeUnit.class);
		dayConstants.put(TimeUnit.HOURS, 24l);
		dayConstants.put(TimeUnit.MINUTES, 1440l);
		dayConstants.put(TimeUnit.SECONDS, 86400l);
		dayConstants.put(TimeUnit.MILLISECONDS, 86400000l);
		dayConstants.put(TimeUnit.MICROSECONDS, 86400000000l);
		dayConstants.put(TimeUnit.NANOSECONDS, 86400000000000l);
		Map<TimeUnit, Long> hourConstants = new EnumMap<TimeUnit, Long>(
				TimeUnit.class);
		hourConstants.put(TimeUnit.MINUTES, 60l);
		hourConstants.put(TimeUnit.SECONDS, 3600l);
		hourConstants.put(TimeUnit.MILLISECONDS, 3600000l);
		hourConstants.put(TimeUnit.MICROSECONDS, 3600000000l);
		hourConstants.put(TimeUnit.NANOSECONDS, 3600000000000l);
		Map<TimeUnit, Long> minuteConstants = new EnumMap<TimeUnit, Long>(
				TimeUnit.class);
		minuteConstants.put(TimeUnit.SECONDS, 60l);
		minuteConstants.put(TimeUnit.MILLISECONDS, 60000l);
		minuteConstants.put(TimeUnit.MICROSECONDS, 60000000l);
		minuteConstants.put(TimeUnit.NANOSECONDS, 60000000000l);
		Map<TimeUnit, Long> secondConstants = new EnumMap<TimeUnit, Long>(
				TimeUnit.class);
		secondConstants.put(TimeUnit.MILLISECONDS, 1000l);
		secondConstants.put(TimeUnit.MICROSECONDS, 1000000l);
		secondConstants.put(TimeUnit.NANOSECONDS, 1000000000l);
		Map<TimeUnit, Long> milliConstants = new EnumMap<TimeUnit, Long>(
				TimeUnit.class);
		milliConstants.put(TimeUnit.MICROSECONDS, 1000l);
		milliConstants.put(TimeUnit.NANOSECONDS, 1000000l);
		Map<TimeUnit, Long> microConstants = new EnumMap<TimeUnit, Long>(
				TimeUnit.class);
		microConstants.put(TimeUnit.NANOSECONDS, 1000l);

		timeConstants.put(TimeUnit.DAYS, dayConstants);
		timeConstants.put(TimeUnit.HOURS, hourConstants);
		timeConstants.put(TimeUnit.MINUTES, minuteConstants);
		timeConstants.put(TimeUnit.SECONDS, secondConstants);
		timeConstants.put(TimeUnit.MILLISECONDS, milliConstants);
		timeConstants.put(TimeUnit.MICROSECONDS, microConstants);

	}
	/**
	 * The TimeUnit that is used in this TimeFormatter
	 */
	private final TimeUnit _myTimeUnit;
	/**
	 * the value of epsilon used in this TimeFormatter
	 */
	private final TimeUnit _epsilon;
	/**
	 * A Factor used for unit conversion
	 */
	private final long _myFactor;
	/**
	 * The number of digits after the decimal point which will be displayed for
	 * the time values.
	 */
	protected final long _floats;

	/**
	 *
	 */
	private final long _precisionFactor;

	/**
	 * Flag that indicates if the time unit will be included in the time String.
	 *
	 */
	private final boolean _writeUnit;

	/**
	 * Constructs a DecimalTimeFormatter.
	 *
	 * @param unit
	 *            java.util.concurrent.TimeUnit : The time values that will be
	 *            used
	 * @param floats
	 *            int : The number of floating point digits to print
	 * @param writeUnit
	 *            boolean : Indicates if the time unit will be included in the
	 *            time String.
	 */
	public SingleUnitTimeFormatter(TimeUnit unit, TimeUnit epsilon, int floats, boolean writeUnit) {
		this._myTimeUnit = unit;
		this._epsilon=epsilon;
		this._floats = floats;
		this._precisionFactor=(long)java.lang.Math.pow(10, floats);
		this._writeUnit = writeUnit;
		this._myFactor=epsilon.convert(1,_myTimeUnit);
	}

	/**Returns the String-Representation of the given TimeInstant
	 *
	 */
	public String buildTimeString(TimeInstant instant) {
		return buildSingleUnitTimeString(instant.getTimeInEpsilon());
	}

	/**Returns the String-Representation of the given TimeSpan
	 *
	 */
	public String buildTimeString(TimeSpan span) {
		return buildSingleUnitTimeString(span.getTimeInEpsilon());
	}

	/**Returns the String-Representation of the given time object.
	 *
	 */
	private String buildSingleUnitTimeString(long timeValue){
		StringBuffer timeStringBuffer = new StringBuffer();

		if (_myTimeUnit.compareTo(_epsilon) > 0) {
			// unit is a coarser granularity than epsilon
			timeStringBuffer.append('.');
			//append seperator
			long fractionTime = _myTimeUnit.convert((timeValue
					% _myFactor)*_precisionFactor,
					_epsilon);

			String fractionTimeString= Long.toString(fractionTime);
			char zero = '0';
			//append as many zeros as needed
			for (int i = fractionTimeString.length(); i <_floats; i++) {
				timeStringBuffer.append(zero);
			}

			timeStringBuffer.append(fractionTimeString);

		}
		timeStringBuffer.insert(0,Long.toString(_myTimeUnit.convert(timeValue,_epsilon)));
		if (_writeUnit) {
			//append the name of the time unit
			timeStringBuffer.append(' ');
			timeStringBuffer.append(_myTimeUnit.name());
		}
		return timeStringBuffer.toString();
	}

    /* (non-Javadoc)
     * @see desmoj.core.simulator.TimeFormatter#usesOnlySingleUnit()
     */
	public String getUnit() {
        return _myTimeUnit.toString().toLowerCase(Locale.ENGLISH);
    }
}


text:
package org.apache.clerezza.commons.rdf.impl.sparql;

import com.hp.hpl.jena.query.DatasetAccessor;
import com.hp.hpl.jena.query.DatasetAccessorFactory;
import java.io.IOException;
import java.net.ServerSocket;
import org.apache.jena.fuseki.EmbeddedFusekiServer;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import java.io.InputStream;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import org.apache.clerezza.commons.rdf.Graph;
import org.apache.clerezza.commons.rdf.IRI;
import org.apache.clerezza.commons.rdf.Language;
import org.apache.clerezza.commons.rdf.Literal;
import org.apache.clerezza.commons.rdf.RDFTerm;
import org.apache.clerezza.commons.rdf.Triple;
import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

/**
 *
 * @author reto
 */
public class SparqlGraphTest {

    final static int serverPort = findFreePort();
    static EmbeddedFusekiServer server;

    @BeforeClass
    public static void prepare() throws IOException {
        final String serviceURI = "http://localhost:" + serverPort + "/ds/data";
        final DatasetAccessor accessor = DatasetAccessorFactory.createHTTP(serviceURI);
        final InputStream in = SparqlGraphTest.class.getResourceAsStream("grounded.ttl");
        final Model m = ModelFactory.createDefaultModel();
        String base = "http://example.org/";
        m.read(in, base, "TURTLE");
        server = EmbeddedFusekiServer.memTDB(serverPort, "/ds");//dataSet.getAbsolutePath());
        server.start();
        System.out.println("Started fuseki on port " + serverPort);
        accessor.putModel(m);
    }

    @AfterClass
    public static void cleanup() {
        server.stop();
    }

    @Test
    public void graphSize() {
        final Graph graph = new SparqlGraph("http://localhost:" + serverPort + "/ds/query");
        Assert.assertEquals("Graph not of the exepected size", 8, graph.size());
    }

    @Test
    public void filter1() {
        final Graph graph = new SparqlGraph("http://localhost:" + serverPort + "/ds/query");
        final IRI spiderman = new IRI("http://example.org/#spiderman");
        final IRI greenGoblin = new IRI("http://example.org/#green-goblin");
        final IRI enemyOf = new IRI("http://www.perceive.net/schemas/relationship/enemyOf");
        final IRI foafName = new IRI("http://xmlns.com/foaf/0.1/name");
        {
            final Iterator<Triple> iter = graph.filter(spiderman, null, greenGoblin);
            Assert.assertTrue(iter.hasNext());
            Assert.assertEquals(enemyOf, iter.next().getPredicate());
            Assert.assertFalse(iter.hasNext());
        }
        {
            final Iterator<Triple> iter = graph.filter(spiderman, foafName, null);
            Set<Literal> names = new HashSet<>();
            for (int i = 0; i < 2; i++) {
                Assert.assertTrue(iter.hasNext());
                RDFTerm name = iter.next().getObject();
                Assert.assertTrue(name instanceof Literal);
                names.add((Literal)name);
            }
            Assert.assertFalse(iter.hasNext());
            Assert.assertTrue(names.contains(new PlainLiteralImpl("Spiderman")));
            Assert.assertTrue(names.contains(new PlainLiteralImpl("Человек-паук", new Language("ru"))));
        }
    }

    public static int findFreePort() {
        int port = 0;
        try (ServerSocket server = new ServerSocket(0);) {
            port = server.getLocalPort();
        } catch (Exception e) {
            throw new RuntimeException("unable to find a free port");
        }
        return port;
    }

}


text:
package com.intellij.openapi.util.io;

import com.intellij.openapi.diagnostic.Logger;
import com.intellij.util.io.UnsyncByteArrayOutputStream;
import com.intellij.util.text.StringFactory;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.io.*;
import java.nio.charset.Charset;

public class StreamUtil {
  private static final Logger LOG = Logger.getInstance(StreamUtil.class);

  private StreamUtil() {
  }

  /**
   * Copy stream. Use NetUtils.copyStreamContent(ProgressIndicator, ...) if you want use ProgressIndicator.
   *
   * @param inputStream source stream
   * @param outputStream destination stream
   * @return bytes copied
   */
  public static int copyStreamContent(@NotNull InputStream inputStream, @NotNull OutputStream outputStream) throws IOException {
    final byte[] buffer = new byte[10 * 1024];
    int count;
    int total = 0;
    while ((count = inputStream.read(buffer)) > 0) {
      outputStream.write(buffer, 0, count);
      total += count;
    }
    return total;
  }

  @NotNull
  public static byte[] loadFromStream(@NotNull InputStream inputStream) throws IOException {
    final UnsyncByteArrayOutputStream outputStream = new UnsyncByteArrayOutputStream();
    try {
      copyStreamContent(inputStream, outputStream);
    }
    finally {
      inputStream.close();
    }
    return outputStream.toByteArray();
  }

  /**
   * @deprecated depends on the default encoding, use StreamUtil#readText(java.io.InputStream, String) instead
   */
  @Deprecated
  @NotNull
  public static String readText(@NotNull InputStream inputStream) throws IOException {
    final byte[] data = loadFromStream(inputStream);
    return new String(data);
  }

  @NotNull
  public static String readText(@NotNull InputStream inputStream, @NotNull String encoding) throws IOException {
    final byte[] data = loadFromStream(inputStream);
    return new String(data, encoding);
  }
  @NotNull
  public static String readText(@NotNull InputStream inputStream, @NotNull Charset encoding) throws IOException {
    final byte[] data = loadFromStream(inputStream);
    return new String(data, encoding);
  }

  @NotNull
  public static String convertSeparators(@NotNull String s) {
    return StringFactory.createShared(convertSeparators(s.toCharArray()));
  }

  @NotNull
  public static char[] readTextAndConvertSeparators(@NotNull Reader reader) throws IOException {
    char[] buffer = readText(reader);

    return convertSeparators(buffer);
  }

  @NotNull
  private static char[] convertSeparators(@NotNull char[] buffer) {
    int dst = 0;
    char prev = ' ';
    for (char c : buffer) {
      switch (c) {
        case'\r':
          buffer[dst++] = '\n';
          break;
        case'\n':
          if (prev != '\r') {
            buffer[dst++] = '\n';
          }
          break;
        default:
          buffer[dst++] = c;
          break;
      }
      prev = c;
    }

    if (dst == buffer.length) {
      return buffer;
    }
    char[] result = new char[dst];
    System.arraycopy(buffer, 0, result, 0, result.length);
    return result;
  }

  @NotNull
  public static String readTextFrom(@NotNull Reader reader) throws IOException {
    return StringFactory.createShared(readText(reader));
  }

  @NotNull
  private static char[] readText(@NotNull Reader reader) throws IOException {
    CharArrayWriter writer = new CharArrayWriter();

    char[] buffer = new char[2048];
    while (true) {
      int read = reader.read(buffer);
      if (read < 0) break;
      writer.write(buffer, 0, read);
    }

    return writer.toCharArray();
  }

  public static void closeStream(@Nullable Closeable stream) {
    if (stream != null) {
      try {
        stream.close();
      }
      catch (IOException e) {
        LOG.error(e);
      }
    }
  }
}