text:
package org.apache.bcel.classfile;

import java.io.DataInput;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.checkerframework.dataflow.qual.Pure;

/**
 * represents one parameter annotation in the parameter annotation table
 *
 * @since 6.0
 */
public class ParameterAnnotationEntry implements Node {

    private final AnnotationEntry[] annotationTable;

    /**
     * Construct object from input stream.
     *
     * @param input Input stream
     * @throws IOException
     */
    ParameterAnnotationEntry(final DataInput input, final ConstantPool constant_pool) throws IOException {
        final int annotation_table_length = input.readUnsignedShort();
        annotationTable = new AnnotationEntry[annotation_table_length];
        for (int i = 0; i < annotation_table_length; i++) {
            // TODO isRuntimeVisible
            annotationTable[i] = AnnotationEntry.read(input, constant_pool, false);
        }
    }

    /**
     * Called by objects that are traversing the nodes of the tree implicitely
     * defined by the contents of a Java class. I.e., the hierarchy of methods,
     * fields, attributes, etc. spawns a tree of objects.
     *
     * @param v Visitor object
     */
    @Override
    public void accept( final Visitor v ) {
        v.visitParameterAnnotationEntry(this);
    }

    /**
     * returns the array of annotation entries in this annotation
     */
    @Pure
    public AnnotationEntry[] getAnnotationEntries() {
        return annotationTable;
    }

    public void dump(final DataOutputStream dos) throws IOException {
        dos.writeShort(annotationTable.length);
        for (final AnnotationEntry entry : annotationTable) {
            entry.dump(dos);
        }
    }

  public static ParameterAnnotationEntry[] createParameterAnnotationEntries(final Attribute[] attrs) {
      // Find attributes that contain parameter annotation data
      final List<ParameterAnnotationEntry> accumulatedAnnotations = new ArrayList<>(attrs.length);
      for (final Attribute attribute : attrs) {
          if (attribute instanceof ParameterAnnotations) {
              final ParameterAnnotations runtimeAnnotations = (ParameterAnnotations)attribute;
              Collections.addAll(accumulatedAnnotations, runtimeAnnotations.getParameterAnnotationEntries());
          }
      }
      return accumulatedAnnotations.toArray(new ParameterAnnotationEntry[accumulatedAnnotations.size()]);
  }
}


text:
package com.example.a_28_json;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.google.gson.Gson;

public class MainActivity extends Activity {
	private Context context;
	private Button btn_ler;

	private String readLog(int iID) {
		StringBuilder contents = new StringBuilder();
		try {
			InputStream inputStream = context.getResources().openRawResource(
					iID);
			InputStreamReader inputreader = new InputStreamReader(inputStream);
			BufferedReader input = new BufferedReader(inputreader);
			try {
				String line = null;
				while ((line = input.readLine()) != null) {
					contents.append(line);
				}
			} finally {
				input.close();
			}
		} catch (IOException ex) {
			ex.printStackTrace();
		}
		return contents.toString();
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.telainicial);
		context = getBaseContext();

		btn_ler = (Button) findViewById(R.id.btn_ler);
		// try {
		// Contato caux = new Contato();
		// caux.setIdcontato(20);
		// caux.setNome("Impacta");

		// ArrayList<JSONObject> listaContatos = new ArrayList<JSONObject>();
		// listaContatos.add(caux.toJSJsonObject());
		// JSONArray jsArray = new JSONArray(listaContatos);

		// JSONObject transmissao = new JSONObject();

		// transmissao.put("contatos", jsArray);
		// String st = transmissao.toString();

		// ArrayList<Contato> listaContato = new ArrayList<Contato>();
		// listaContato.add(caux);

		// Gson gson = new Gson();

		// Trasm transmissao_Env = new Trasm();
		// Trasm trasmissao_Rec = new Trasm();

		// transmissao_Env.setContatos(listaContato);

		// Trasm transmissao = new Trasm();
		// transmissao.setContatos(listaContato);

		// String st = gson.toJson(transmissao_Env);
		// trasmissao_Rec = gson.fromJson(st, Trasm.class);

		// int i = 10;
		// i = 20;
		// } catch (JSONException e) {
		// e.printStackTrace();
		// }
		btn_ler.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {

				Gson gson = new Gson();
				OrdemLista olista_env = new OrdemLista();
				OrdemLista olista_rec = new OrdemLista();

				olista_rec = gson.fromJson(readLog(R.raw.os_lista),	OrdemLista.class);

				int i = 10;

			}
		});
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}

redpajama_set_name: RedPajamaGithub


text:
namespace Simple.Web.Helpers
{
    using System.IO;

    internal sealed class FileUtility : IFileUtility
    {
        /// <summary>
        /// Checks to see whether a path exists.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <returns>
        ///   <c>true</c> if the path exists; otherwise <c>false</c>.
        /// </returns>
        public bool Exists(string path)
        {
            return File.Exists(path);
        }
    }
}


text:
// mock_cni is a mock of the `libcni.CNI` interface. It's a handwritten mock
// because there are only two functions to deal with.
package mock_cni

import (
	"github.com/appc/cni/libcni"
	"github.com/appc/cni/pkg/types"
	"github.com/stretchr/testify/mock"
)

type MockCNI struct {
	mock.Mock
}

func (m *MockCNI) AddNetwork(net *libcni.NetworkConfig, rt *libcni.RuntimeConf) (*types.Result, error) {
	args := m.Called(net, rt)
	return args.Get(0).(*types.Result), args.Error(1)
}

func (m *MockCNI) DelNetwork(net *libcni.NetworkConfig, rt *libcni.RuntimeConf) error {
	args := m.Called(net, rt)
	return args.Error(0)
}


text:
function relpath() {
    python -c "import os, sys; print(os.path.relpath(*sys.argv[1:]))" "$@"
}

# Link the given src file into the dotfiles' bin directory using relative paths
function dotbinlink() {
    src="$1"
    if [[ -z "$src" ]]; then
        echo 'Usage: dotbinlink executable_src'
        return 2
    fi
    if [[ ! -e "$src" ]]; then
        echo "dotbinlink: Source does not exist: '$src'"
        return 2
    fi
    dest="$HOME/.dotfiles/bin/$src"
    dest_dir=$(dirname "$dest")
    src="$PWD/$src"
    ln -sf "$(relpath "$src" "$dest_dir")" "$dest"
}

# Only perform the specified command if DEFINITELY_ME is 'yes'.
# This prevents "John Starich"-specific configuration files
# from showing up in someone else's git commits or something.
definitely_me() {
    if [[ "$DEFINITELY_ME" == 'yes' ]]; then
        "$@"
    fi
}

function dotlink() {
    src="$1"
    dest="$2"
    if [[ -z "$src" || -z "$dest" ]]; then
        echo 'Usage: dotlink module_relative_src absolute_link_location'
        return 2
    fi
    if [[ ! -e "$src" ]]; then
        echo "dotlink: Source does not exist: '$src'"
        return 2
    fi
    if [[ -e "$dest" ]]; then
        if [[ -L "$dest" ]]; then
            rm "$dest"
        else
            echo "Skipping: Dotfiles link could not be made, non-link file exists: $dest"
            return 0
        fi
    fi
    if [[ ! "$src" =~ ^/ ]]; then
        src="$PWD/$src"
    fi
    ln -sf "$src" "$dest"
}

function dotpip() {
    local packages=$(pip freeze | sed -e 's/==//')
    local toinstall=()
    for arg in "$@"; do
        if ! grep -q "$arg" <<<"$packages"; then
            toinstall+=("$arg")
        fi
    done
    if (( ${#toinstall} > 0 )); then
        pip install "${toinstall[@]}"
    fi
}

function dotpip3() {
    local packages=$(pip3 freeze | sed -e 's/==//')
    local toinstall=()
    for arg in "$@"; do
        if ! grep -q "$arg" <<<"$packages"; then
            toinstall+=("$arg")
        fi
    done
    if (( ${#toinstall} > 0 )); then
        pip3 install "${toinstall[@]}"
    fi
}

function macos() {
    if [[ "`uname`" == 'Darwin' ]]; then
        if [[ ! -z "$@" ]]; then
            eval "$@"
            return $?
        else
            return 0
        fi
    fi
    return 1
}

# Clear the line and print the string
function printr() {
    echo -en "\r\033[K$*"
}