text:
package org.apache.hadoop.streaming;

import junit.framework.TestCase;
import java.io.*;
import java.util.*;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.mapred.*;
import org.apache.hadoop.dfs.MiniDFSCluster;
/**
 * This test case tests the symlink creation
 * utility provided by distributed caching
 * @author mahadev
 *
 */
public class TestSymLink extends TestCase
{
  String INPUT_FILE = "/testing-streaming/input.txt";
  String OUTPUT_DIR = "/testing-streaming/out";
  String CACHE_FILE = "/testing-streaming/cache.txt";
  String input = "check to see if we can read this none reduce";
  String map = "xargs cat ";
  String reduce = "cat";
  String mapString = "testlink\n";
  String cacheString = "This is just the cache string";
  StreamJob job;

  public TestSymLink() throws IOException
  {
  }

  public void testSymLink()
  {
    try {
      boolean mayExit = false;
      int jobTrackerPort = 60050;
      MiniMRCluster mr = null;
      MiniDFSCluster dfs = null;
      FileSystem fileSys = null;
      try{
        Configuration conf = new Configuration();
        dfs = new MiniDFSCluster(8050, conf, false);
        fileSys = dfs.getFileSystem();
        String namenode = fileSys.getName();
        mr  = new MiniMRCluster(jobTrackerPort, 60060, 1, namenode, true, 3);
        // During tests, the default Configuration will use a local mapred
        // So don't specify -config or -cluster
        String strJobtracker = "mapred.job.tracker=" + "localhost:" + mr.getJobTrackerPort();
        String strNamenode = "fs.default.name=" + namenode;
        String argv[] = new String[] {
            "-input", INPUT_FILE,
            "-output", OUTPUT_DIR,
            "-mapper", map,
            "-reducer", reduce,
            //"-verbose",
            //"-jobconf", "stream.debug=set"
            "-jobconf", strNamenode,
            "-jobconf", strJobtracker,
            "-cacheFile", "dfs://"+fileSys.getName()+CACHE_FILE + "#testlink"
        };

        fileSys.delete(new Path(OUTPUT_DIR));
        fileSys.mkdirs(new Path(OUTPUT_DIR));

        DataOutputStream file = fileSys.create(new Path(INPUT_FILE));
        file.writeBytes(mapString);
        file.close();
        file = fileSys.create(new Path(CACHE_FILE));
        file.writeBytes(cacheString);
        file.close();

        job = new StreamJob(argv, mayExit);
        job.go();
        String line = null;
        Path[] fileList = fileSys.listPaths(new Path(OUTPUT_DIR));
        for (int i = 0; i < fileList.length; i++){
          System.out.println(fileList[i].toString());
          BufferedReader bread =
            new BufferedReader(new InputStreamReader(fileSys.open(fileList[i])));
          line = bread.readLine();
          System.out.println(line);
        }
        assertEquals(cacheString + "\t", line);
      } finally{
        if (fileSys != null) { fileSys.close(); }
        if (dfs != null) { dfs.shutdown(); }
        if (mr != null) { mr.shutdown();}
      }

    } catch(Exception e) {
      failTrace(e);
    }
  }

  void failTrace(Exception e)
  {
    StringWriter sw = new StringWriter();
    e.printStackTrace(new PrintWriter(sw));
    fail(sw.toString());
  }

  public static void main(String[]args) throws Exception
  {
    new TestStreaming().testCommandLine();
  }

}

redpajama_set_name: RedPajamaGithub


text:
package com.teleca.jamendo.api.impl;

import org.json.JSONException;
import org.json.JSONObject;

import com.teleca.jamendo.api.PlaylistRemote;

public class PlaylistBuilder extends JSONBuilder<PlaylistRemote> {

	@Override
	public PlaylistRemote build(JSONObject jsonObject) throws JSONException {
		PlaylistRemote playlistRemote = new PlaylistRemote();
		playlistRemote.setDuration(jsonObject.getInt("duration"));
		playlistRemote.setId(jsonObject.getInt("id"));
		playlistRemote.setName(jsonObject.getString("name"));
		return playlistRemote;
	}

}


text:
from pyramid.view import view_config, view_defaults

@view_config(route_name='home', renderer='home.mako')
def home_view(request):
    return {'title': 'CROW | Centralized Remote Observations Website'}

@view_defaults(route_name='sources')
class SourcesREST(object):
    def __init__(self, request):
        self.request = request

    @view_config(request_method='GET', xhr=True, renderer='json')
    def get_sources(self):
        feed_collection = self.request.db['feeds']

        feeds = []
        for feed in feed_collection.find():
            feeds.append({
                'name': feed['name'],
                'uri': feed['uri'],
                'menu_title': feed['menu_title'],
                'group': feed['group'],
                'url': feed['url']
            })

        return feeds


text:
package com.shc.gwtal.client.webaudio.nodes;

import com.google.gwt.typedarrays.shared.Float32Array;

/**
 * @author Sri Harsha Chilakapati
 */
public class IIRFilterNode extends AudioNode
{
    protected IIRFilterNode()
    {
    }

    public final native void getFrequencyResponse(Float32Array frequencyHz, Float32Array magResponse,
                                                  Float32Array phaseResponse) /*-{
        this.getFrequencyResponse(frequencyHz, magResponse, phaseResponse);
    }-*/;
}


text:
express-livescript
====================

The sample application using express3 and livescript

****
The scoping issues in CoffeeScript (well-described in Armin Ronacher's blog post), along with various other oddities and difficulties, have led me to conclude that it is not usable as a general-purpose JavaScript semi-replacement.
****


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('fieldsight', '0001_initial'),
    ]

    operations = [
        migrations.AlterUniqueTogether(
            name='userrole',
            unique_together=set([]),
        ),
        migrations.RemoveField(
            model_name='userrole',
            name='group',
        ),
        migrations.RemoveField(
            model_name='userrole',
            name='organization',
        ),
        migrations.RemoveField(
            model_name='userrole',
            name='project',
        ),
        migrations.RemoveField(
            model_name='userrole',
            name='site',
        ),
        migrations.RemoveField(
            model_name='userrole',
            name='user',
        ),
        migrations.DeleteModel(
            name='UserRole',
        ),
    ]


text:
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;

use App\Repositories\TransactionRepository;
use App\Repositories\ItemRepository;
use App\Repositories\ConsignorRepository;

class ReportsController extends Controller
{
  /**
     * The transaction repository instance.
     *
     * @var TransactionRepository
     */
	protected $transactions;

	/**
     * The item repository instance.
     *
     * @var ItemRepository
     */
	protected $items;

	/**
     * The Consignor repository instance.
     *
     * @var ConsignorRepository
     */
	protected $consignors;

    public function __construct(TransactionRepository $transactions, ItemRepository $items, ConsignorRepository $consignors) {
		//$this->middleware('auth');
		$this->transactions = $transactions;
		$this->items = $items;
		$this->consignors = $consignors;
	}

	/**
     * Display a list of all transactions.
     *
     * @param  Request  $request
     * @return Response
     */
    public function index(Request $request)
    {
        return view('report.index', [
			"consignors" => $this->consignors->getAllActive(),
			"transactions" => $this->transactions->getAllActive()
		]);
    }

	/**
     * Get most sold items.
     *
     * @param  Request  $request
     * @return Response	$response
     */
	public function ajaxGetMostSoldItems(Request $request, $date) {

		$items = $this->transactions->getMostSoldItems($date,5);

		$response = array(
			"data" => $items
		);

		return \Response::json($response);
	}
}


text:
#include "common/test_rpc_server_dir.h"

#include "libxtreemfs/pbrpc_url.h"
#include "xtreemfs/DIR.pb.h"
#include "xtreemfs/DIRServiceConstants.h"

using namespace std;
using namespace xtreemfs::pbrpc;

namespace xtreemfs {
namespace rpc {

TestRPCServerDIR::TestRPCServerDIR() {
  interface_id_ = INTERFACE_ID_DIR;
  // Register available operations.

  operations_[PROC_ID_XTREEMFS_SERVICE_GET_BY_NAME]
      = Op(this, &TestRPCServerDIR::GetServiceByNameOperation);
  operations_[PROC_ID_XTREEMFS_SERVICE_GET_BY_UUID]
      = Op(this, &TestRPCServerDIR::GetServiceByUUIDOperation);
  operations_[PROC_ID_XTREEMFS_ADDRESS_MAPPINGS_GET]
      = Op(this, &TestRPCServerDIR::GetAddressMappingOperation);

}

void TestRPCServerDIR::RegisterVolume(const std::string& volume_name,
                                      const std::string& mrc_uuid) {
  boost::mutex::scoped_lock lock(mutex_);
  known_volumes_[volume_name] = mrc_uuid;
}

google::protobuf::Message* TestRPCServerDIR::GetServiceByNameOperation(
    const pbrpc::Auth& auth,
    const pbrpc::UserCredentials& user_credentials,
    const google::protobuf::Message& request,
    const char* data,
    uint32_t data_len,
    boost::scoped_array<char>* response_data,
    uint32_t* response_data_len) {
  const serviceGetByNameRequest* rq
      = reinterpret_cast<const serviceGetByNameRequest*>(&request);

  string mrc_uuid;
  {
    boost::mutex::scoped_lock lock(mutex_);
    map<string, string>::iterator iter = known_volumes_.find(rq->name());
    if (iter != known_volumes_.end()) {
      mrc_uuid = iter->second;
    }
  }

  ServiceSet* response = new ServiceSet();
  if (!mrc_uuid.empty()) {
    Service* new_entry = response->add_services();
    new_entry->set_type(SERVICE_TYPE_VOLUME);
    new_entry->set_uuid(mrc_uuid);
    new_entry->set_version(0);
    new_entry->set_name(rq->name());
    new_entry->set_last_updated_s(0);
    KeyValuePair* new_data = new_entry->mutable_data()->add_data();
    new_data->set_key("mrc");
    new_data->set_value(mrc_uuid);
  }
  return response;
}

google::protobuf::Message* TestRPCServerDIR::GetServiceByUUIDOperation(
    const pbrpc::Auth& auth,
    const pbrpc::UserCredentials& user_credentials,
    const google::protobuf::Message& request,
    const char* data,
    uint32_t data_len,
    boost::scoped_array<char>* response_data,
    uint32_t* response_data_len) {
  const serviceGetByUUIDRequest* rq
      = reinterpret_cast<const serviceGetByUUIDRequest*>(&request);

  string mrc_uuid = rq->name();
  string name;
  {
    boost::mutex::scoped_lock lock(mutex_);
    map<string, string>::iterator iter;

    for (iter = known_volumes_.begin(); iter != known_volumes_.end(); ++iter) {
        if (iter->second == mrc_uuid) {
            name = iter->first;
            mrc_uuid = iter->second;
            break;
        }
    }
  }

  ServiceSet* response = new ServiceSet();
  if (!name.empty()) {
    Service* new_entry = response->add_services();
    new_entry->set_type(SERVICE_TYPE_VOLUME);
    new_entry->set_uuid(mrc_uuid);
    new_entry->set_version(0);
    new_entry->set_name(name);
    new_entry->set_last_updated_s(0);
    KeyValuePair* new_data = new_entry->mutable_data()->add_data();
    new_data->set_key("mrc");
    new_data->set_value(mrc_uuid);
  }
  return response;
}

google::protobuf::Message* TestRPCServerDIR::GetAddressMappingOperation(
    const pbrpc::Auth& auth,
    const pbrpc::UserCredentials& user_credentials,
    const google::protobuf::Message& request,
    const char* data,
    uint32_t data_len,
    boost::scoped_array<char>* response_data,
    uint32_t* response_data_len) {
  const addressMappingGetRequest* rq
      = reinterpret_cast<const addressMappingGetRequest*>(&request);

  AddressMappingSet* response = new AddressMappingSet();

  AddressMapping* mapping = response->add_mappings();
  size_t uuid_split_pos = rq->uuid().find_last_of(":");
  mapping->set_uuid(rq->uuid());
  mapping->set_version(0);
  mapping->set_protocol(PBRPCURL::SCHEME_PBRPC);
  mapping->set_address(rq->uuid().substr(0, uuid_split_pos));
  mapping->set_port(atoi(rq->uuid().substr(uuid_split_pos+1).c_str()));
  mapping->set_match_network("*");
  mapping->set_ttl_s(3600);
  mapping->set_uri("");

  return response;
}

}  // namespace rpc
}  // namespace xtreemfs


text:
package com.blogspot.toomuchcoding.book.chapter7._6_ArgumentCapturing.annotations;

import static com.blogspot.toomuchcoding.common.assertj.MyBddAssertions.*;
import static org.mockito.Mockito.*;

import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.testng.annotations.Listeners;
import org.testng.annotations.Test;

import com.blogspot.toomuchcoding.book.chapter7._6_ArgumentCapturing.TaxService;
import com.blogspot.toomuchcoding.book.chapter7._6_ArgumentCapturing.TaxTransferer;
import com.blogspot.toomuchcoding.common.testng.MockitoTestNGListener;
import com.blogspot.toomuchcoding.person.Person;

@Listeners(MockitoTestNGListener.class)
public class TaxTransfererTestNgTest {

    @Mock TaxService taxService;

    @InjectMocks TaxTransferer systemUnderTest;

    @Captor ArgumentCaptor<Person> personCaptor;

    @Test
    public void should_change_persons_country_before_sending_data_through_ws() {
        // when
        systemUnderTest.transferTaxFor(new Person("Lewandowski", "UK"));

        // then
        verify(taxService).transferTaxFor(personCaptor.capture());
	    then(personCaptor.getValue()).hasName("Lewandowski").hasCountry("Poland");
    }
}


text:
<!DOCTYPE html>

  <meta charset="utf-8"><title>default title</title>
  <meta content="" name="author">
  <meta content="" name="description">
  <meta content="" name="keywords">
  <meta content="telephone=no" name="format-detection">
  <meta name="robots" content="noodp, noydir">
  <meta name="viewport" content="initial-scale=1, minimum-scale=1, width=device-width">
  <meta name="HandheldFriendly" content="true"><meta content="IE=edge" http-equiv="X-UA-Compatible">

<<<<<<< HEAD
  <link href="../builds/static/css/main.min.css" rel="stylesheet" type="text/css">
=======
  <link href="css/main.min.css" rel="stylesheet" type="text/css">
>>>>>>> 037fa36a3da636e6def1167024660ca57c0688bd
  <link rel="stylesheet" type="text/css" href="http://cdn.jsdelivr.net/jquery.slick/1.5.0/slick.css"/>
  <meta property="og:title" content="default title"><meta property="og:title" content="" />
  <meta property="og:url" content="" />
  <meta property="og:description" content="" />
  <meta property="og:image" content="" />
  <meta property="og:image:type" content="image/jpeg" />
  <meta property="og:image:width" content="500" />
  <meta property="og:image:height" content="300" />
  <meta property="twitter:description" content="" />
  <link rel="image_src" href="" />
  <link rel="icon" type="image/png" href="favicon.ico">
   <link href="css/style.css" rel="stylesheet" type="text/css">

Объявить тендер

 20 городов354 подрядчика231 тендер

Вход / Регистрация

ГлавнаяГлавная страница сайта

ТендерыЗаявки на ремонт и строительство

ПодрядчикиЗаявки на ремонт и строительство

Ремонт и отделкаСтроительство

НовостиСтатьи, новости, акции

Обратная связьВаши предложения и отзывы

ВЫБЕРИТЕ ГОРОД:

Астана

Алматы

Караганда

Петровавловск

Усть-Каменогорск

Костанай

          <input type="hidden" value="" class="header-city-select__input">

Объявить тендер

Пожалуйста, укажите свои реальные данные, это облегчит взаимодействие между вами и заказчиками

      <form method="" action="" class="registration-contractor-form">
         Название тендера

            <input type="text" value="" class="registration-contractor-form__input">

		 Специализации

Выбрать специализациюМаксимум 1 специализация

         Описания работы

            <textarea type="text" value="" class="form_textarea_tender"></textarea>

         Прикрепить файлы

					<input type="hidden"  value=""><input type="file"   onchange="document.getElementById("fileName").value=this.value">

					<input type="text" class="inputFileVal" placeholder="выберите файл" readonly="readonly" id="fileName">

         Контактный телефон

            <input type="text" value="" class="registration-contractor-form__input">

         Бюджет проекта

            <input type="text" value="" class="registration-contractor-form__input">

         Город / Край / Посёлок

            <input type="text" value="" class="registration-contractor-form__input">

         Улица / Проезд / Переулок / Дом

            <input type="text" value="" class="registration-contractor-form__input">Мы не будем показывать Ваш адрес другим пользователям. Адрес необходим для размещения метки на карте

            <input type="checkbox" value="">Я согласен с условиями пользования сервисом

        <input type="submit" value="ОБЪЯВИТЬ ТЕНДЕР" class="form__submit">
      </form>

Новости

Название новости

Текст новости, в общем тут пока что рыбный текст, но в идеале любая информация, новость, которая должна тут быть... В общем я только дизайнер :[ так что хз что тут должно быть, но наверное что-то про ремонт или рабочих, или еще чего...

Название новости

Текст новости, в общем тут пока что рыбный текст, но в идеале любая информация, новость, которая должна тут быть... В общем я только дизайнер :[ так что хз что тут должно быть, но наверное что-то про ремонт или рабочих, или еще чего...

Название новости

Текст новости, в общем тут пока что рыбный текст, но в идеале любая информация, новость, которая должна тут быть... В общем я только дизайнер :[ так что хз что тут должно быть, но наверное что-то про ремонт или рабочих, или еще чего...

Название новости

Текст новости, в общем тут пока что рыбный текст, но в идеале любая информация, новость, которая должна тут быть... В общем я только дизайнер :[ так что хз что тут должно быть, но наверное что-то про ремонт или рабочих, или еще чего...

Название новости

Текст новости, в общем тут пока что рыбный текст, но в идеале любая информация, новость, которая должна тут быть... В общем я только дизайнер :[ так что хз что тут должно быть, но наверное что-то про ремонт или рабочих, или еще чего...

Название компании © 2015 год

x

Войти

    <form method="" action="" class="form">
      E-mail:
      <input type="email" value="" class="form__input">
      Пароль:
      <input type="password" value="" class="form__input">
      <input type="submit" value="Войти" class="form__submit">Забыли пароль?
    </form>

x

Восстановить

    <form method="" action="" class="form">
      E-mail:
      <input type="email" value="" class="form__input">

 Для восстановление  пароля напишите свой E-mail

	    <input type="submit" value="Отправить" class="form__submit">
    </form>

x

Обратная связь

    <form method="" action="" class="form">
		Фамилия:
		<input type="text" value="" class="form__input">
      Имя:
		<input type="text" value="" class="form__input">
      E-mail:
		<input type="text" value="" class="form__input">
      Телефон:
      <input type="phone" value="" class="form__input">
	 Сообщения:
	  <textarea type="text" value="" class="form_textarea_tender"></textarea>
	    <input type="submit" value="Отправить" class="form__submit">
    </form>

x

Регистрация
Я — заказчикЯ собираюсь объявить тендер и выбрать подходящего мастераЯ — подрядчикЯ собираюсь разместить информацию о себе и участвовать в тендерах

x

Выберите специализациюВыбрать

Ремонт и Отделка

Отделочные работы

            Косметический ремонт
            Малярные, штукатурные работы
            Монтаж потолков (французские, натяжные, 3D)
            Поклейка обоев
            Укладка и ремонт паркета, ламината
            Укладка линолеума, ковролина
            Укладка плитки, мозаики
            Изготовление и монтаж лепнины
            Художественная роспись
            Отделка балконов
            Фотообои
            Стяжка выравнивание полов
            Монтаж гипсокартона

Ремонтные работы

            Ремонт квартиры под ключ
            Ремонт кухни
            Ремонт ванной, туалета
            Ремонт офиса
            Ремонт магазина
            Дизайн квартир
            Возведение стен и перегородок
            Установка пластиковых окон
            Установка дверей
            3D полы
            Изготовление лестниц
            Кладка печей и каминов
            Отделка домов, коттеджей
            Фасадная отделка

Инженерно-монтажные работы

            Электромонтажные работы
            Сантехнические работы
            Монтаж трубопроводов
            Отопление и водоснабжение
            Монтаж теплового пола
            Монтаж систем видеонаблюдения и охраны
            Монтаж систем пожарной автоматики
            Монтаж канализации
            Монтаж вентиляции
            Установка кондиционеров
            Установка антенн, подключение телефона, интернета
            Установка водоочистных фильтров
            Установка газо-водо-теплосчетчиков
            Установка систем «Умный дом»
            Газификация
            Монтаж изоляции

Интерьер и дизайн

            Дизайн интерьера
            Жалюзи
            Пошив штор
            Текстильный дизайн
            Фотодизайн
            Художественная роспись
            Изготовление мебели на заказ
            Перетяжка, реставрация мебели
            Художественная ковка и литьё
            Работы по дереву
            Витражи

Мелкие бытовые услуги

            «Муж в аренду»
            Ремонт, регулировка окон
            Подключение и ремонт бытовой техники
            Реставрация ванн
            Установка, замена замков
            Монтаж телевизоров

Транспортные услуги

            Доставка, подъем стройматериалов
            Помощь при переезде
            Вывоз мусора, грунта, снега
            Услуги грузчиков

Дополнительные услуги

            Перепланировка и согласование
            Аренда строительного оборудования
            Сборка, разборка мебели
            Плотницкие работы столярные работы
            Клининг
            Подбор стройматериалов
            Заказ 3D панорам для рекламы

Услуги специалистов

            Услуги сантехника
            Услуги электрика
            Услуги газовика

Строительство

Архитектура, проектирование и дизайн

            Проектирование частных домов, коттеджей
            Проектирование жилых домов
            Проектирование коммерческих объектов
            Промышленное проектирование
            Готовые проекты
            Проектирование инженерных сетей
            Проектирование инженерных систем
            Архитектурный дизайн
            Ландшафтное проектирование и дизайн
            Технадзор
            Сметные работы
            Геодезические работы

Строительно-монтажные работы

            Строительство домов, коттеджей
            Строительство бань и саун
            Строительство заборов
            Строительство туалетов
            Строительство беседок
            Строительство веранд
            Строительство гаражей
            Строительство теплиц
            Строительство срубов
            Быстровозводимые дома
            Земляные работы
            Строительство фундамента
            Бетонные работы
            Строительство стен и перегородок
            Кровельные работы
            Изоляционные работы
            Фасадные работы
            Услуги каменщиков
            Снос зданий, демонтаж
            Рольставни, роллеты, секционные ворота
            Изготовление лестниц
            Бурение скважин
            Дренаж
            Изготовление ворот
            Подбор и установка насосов

Промышленное строительство

            Строительство дорог
            Строительство трубопроводов
            Строительство складов
            Устройство промышленных полов
            Сварочные работы
            Изготовление и монтаж металлоконструкций
            Витражное, промышленное остекление
            Монтаж промышленных инженерных сетей
            Монтаж промышленных инженерных систем
            Альтернативные источники энергии

Благоустройство территорий

            Дорожные работы
            Озеленение
            Искусственные водоёмы и пруды
            Строительство фонтанов
            Наружное освещение
            Укладка тротуарной плитки
            Строительство бассейнов
            Работы по мрамору

Дополнительные услуги

            Высотные работы
            Аренда строительной техники
            Вывоз мусора и грунта
            Доставка стройматериалов
            Услуги грузчиков
            Газонокосильщик

x

Регистрация заказчика

    <form method="" action="" class="form">
      Фамилия:
      <input type="text" value="" class="form__input">
      Имя:
      <input type="text" value="" class="form__input">
      E-mail:
      <input type="text" value="" class="form__input">
      Телефон:
      <input type="text" value="" class="form__input">
      Пароль:
      <input type="text" value="" class="form__input">
      Повторите пароль:
      <input type="text" value="" class="form__input">

        <input type="checkbox" value="">Я согласен с условиями пользования сервисом

      <input type="submit" value="Зарегистрироваться" class="form__submit">
    </form>

<<<<<<>>>>>> 037fa36a3da636e6def1167024660ca57c0688bd


text:
import { Component } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { SprkTableGroupedColumnDirective } from './sprk-table-grouped-column.directive';

@Component({
  selector: 'sprk-test-component',
  template: `

  `
})
class TestComponent {}

describe('SprkTableGroupedColumnDirective', () => {
  let fixture: ComponentFixture<TestComponent>;
  let component: TestComponent;
  let element1: HTMLElement;
  let element2: HTMLElement;

  beforeEach(() => {
    TestBed.configureTestingModule({
      declarations: [TestComponent, SprkTableGroupedColumnDirective]
    }).compileComponents();

    fixture = TestBed.createComponent(TestComponent);
    component = fixture.componentInstance;
    element1 = fixture.nativeElement.querySelectorAll('th')[0];
    element2 = fixture.nativeElement.querySelectorAll('th')[1];
    fixture.detectChanges();
  });

  it('should create itself', () => {
    expect(component).toBeTruthy();
  });

  it('should add classes if additionalClasses has a value', () => {
    expect(element1.classList.contains('sprk-u-man')).toEqual(true);
    expect(element2.classList.toString()).toEqual(
      'sprk-b-Table__grouped-column'
    );
  });
});


text:
lychee.define('Input').tags({
	platform: 'nodejs'
}).includes([
	'lychee.event.Emitter'
]).supports(function(lychee, global) {

	if (typeof process !== 'undefined') {

		if (typeof process.stdin === 'object' && typeof process.stdin.on === 'function') {
			return true;
		}

	}

	return false;

}).exports(function(lychee, global) {

	/*
	 * EVENTS
	 */

	var _instances = [];

	var _listeners = {

		keyboard: function(key) {

			// This is apparently a hack to have a TTY conform behaviour
			if (key.ctrl === true && key.name === 'c') {

				key.name  = 'escape';
				key.ctrl  = false;
				key.alt   = false
				key.shift = false;

			}

			for (var i = 0, l = _instances.length; i < l; i++) {
				_process_key.call(_instances[i], key.name, key.ctrl, key.meta, key.shift);
			}

		}

	};

	/*
	 * FEATURE DETECTION
	 */

	(function() {

		process.stdin.on('keypress', _listeners.keyboard);

		if (lychee.debug === true) {
			console.info('lychee.Input: Supported methods are Keyboard');
		}

	})();

	/*
	 * HELPERS
	 */

	// TODO: Modifier support is missing, I have no idea how to work around the TTY behaviour.

	var _process_key = function(key, ctrl, alt, shift) {

		if (this.key === false) return false;

		// 2. Only fire after the enforced delay
		var delta = Date.now() - this.__clock.key;
		if (delta < this.delay) {
			return;
		}

		// 3. Check for current key being a modifier
		if (this.keymodifier === false) {

			if (key === 'ctrl' || key === 'meta' || key === 'shift') {
				return true;
			}

		}

		var name = '';

		if (ctrl  === true) name += 'ctrl-';
		if (alt   === true) name += 'alt-';
		if (shift === true) name += 'shift-';

		name += key.toLowerCase();

		var handled = false;

		if (key !== null) {

			// allow bind('key') and bind('ctrl-a');

			handled = this.trigger('key', [ key, name, delta ]) || handled;
			handled = this.trigger(name,  [ delta ])            || handled;

		}

		this.__clock.key = Date.now();

		return handled;

	};

	/*
	 * IMPLEMENTATION
	 */

	var Class = function(data) {

		var settings = lychee.extend({}, data);

		this.delay       = 0;
		this.key         = false;
		this.keymodifier = false;
		this.touch       = false;
		this.swipe       = false;

		this.__clock  = {
			key:   Date.now(),
			touch: Date.now(),
			swipe: Date.now()
		};

		this.setDelay(settings.delay);
		this.setKey(settings.key);
		this.setKeyModifier(settings.keymodifier);
		this.setTouch(settings.touch);
		this.setSwipe(settings.swipe);

		lychee.event.Emitter.call(this);

		_instances.push(this);

		settings = null;

	};

	Class.prototype = {

		destroy: function() {

			var found = false;

			for (var i = 0, il = _instances.length; i < il; i++) {

				if (_instances[i] === this) {
					_instances.splice(i, 1);
					found = true;
					il--;
					i--;
				}

			}

			this.unbind();

			return found;

		},

		/*
		 * ENTITY API
		 */

		// deserialize: function(blob) {},

		serialize: function() {

			var data = lychee.event.Emitter.prototype.serialize.call(this);
			data['constructor'] = 'lychee.Input';

			var settings = {};

			if (this.delay !== 0)           settings.delay       = this.delay;
			if (this.key !== false)         settings.key         = this.key;
			if (this.keymodifier !== false) settings.keymodifier = this.keymodifier;
			if (this.touch !== false)       settings.touch       = this.touch;
			if (this.swipe !== false)       settings.swipe       = this.swipe;

			data['arguments'][0] = settings;

			return data;

		},

		/*
		 * CUSTOM API
		 */

		setDelay: function(delay) {

			delay = typeof delay === 'number' ? delay : null;

			if (delay !== null) {

				this.delay = delay;

				return true;

			}

			return false;

		},

		setKey: function(key) {

			if (key === true || key === false) {

				this.key = key;

				return true;

			}

			return false;

		},

		setKeyModifier: function(keymodifier) {

			if (keymodifier === true || keymodifier === false) {

				this.keymodifier = keymodifier;

				return true;

			}

			return false;

		},

		setTouch: function(touch) {

			if (touch === true || touch === false) {
				return false;
			}

			return false;

		},

		setSwipe: function(swipe) {

			if (swipe === true || swipe === false) {
				return false;
			}

			return false;

		}

	};

	return Class;

});


text:
namespace MassTransit
{
    using System;
    using Configuration;
    using DependencyInjection;
    using Microsoft.Extensions.DependencyInjection;
    using Microsoft.Extensions.DependencyInjection.Extensions;
    using Middleware;
    using Saga;

    public static class DependencyInjectionExtensions
    {
        /// <summary>
        /// Creates a single scope for the receive endpoint that is used by all consumers, sagas, messages, etc.
        /// </summary>
        /// <param name="configurator"></param>
        /// <param name="serviceProvider"></param>
        public static void UseServiceScope(this IConsumePipeConfigurator configurator, IServiceProvider serviceProvider)
        {
            var scopeProvider = new ConsumeScopeProvider(serviceProvider);
            var specification = new FilterPipeSpecification<ConsumeContext>(new ScopeConsumeFilter(scopeProvider));

            configurator.AddPrePipeSpecification(specification);
        }

        /// <summary>
        /// Creates a scope for each message type, compatible with UseMessageRetry and UseInMemoryOutbox
        /// </summary>
        /// <param name="configurator"></param>
        /// <param name="serviceProvider"></param>
        public static void UseMessageScope(this IConsumePipeConfigurator configurator, IServiceProvider serviceProvider)
        {
            if (configurator == null)
                throw new ArgumentNullException(nameof(configurator));
            if (serviceProvider == null)
                throw new ArgumentNullException(nameof(serviceProvider));

            var observer = new MessageScopeConfigurationObserver(configurator, serviceProvider);
        }

        /// <summary>
        /// Register the InMemory saga repository for the specified saga type
        /// </summary>
        /// <param name="collection"></param>
        /// <typeparam name="T"></typeparam>
        public static void RegisterInMemorySagaRepository<T>(this IServiceCollection collection)
            where T : class, ISaga
        {
            collection.TryAddSingleton(new IndexedSagaDictionary<T>());
            collection.RegisterSagaRepository<T, IndexedSagaDictionary<T>, InMemorySagaConsumeContextFactory<T>, InMemorySagaRepositoryContextFactory<T>>();
        }

        /// <summary>
        /// Create a request client, using the specified service address, using the <see cref="IClientFactory" /> from the container.
        /// </summary>
        /// <param name="provider"></param>
        /// <param name="timeout">The default timeout for requests</param>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        public static IRequestClient<T> CreateRequestClient<T>(this IServiceProvider provider, RequestTimeout timeout = default)
            where T : class
        {
            return provider.GetRequiredService<IClientFactory>().CreateRequestClient<T>(timeout);
        }

        /// <summary>
        /// Create a request client, using the specified service address, using the <see cref="IClientFactory" /> from the container.
        /// </summary>
        /// <param name="provider"></param>
        /// <param name="destinationAddress">The destination service address</param>
        /// <param name="timeout">The default timeout for requests</param>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        public static IRequestClient<T> CreateRequestClient<T>(this IServiceProvider provider, Uri destinationAddress, RequestTimeout timeout = default)
            where T : class
        {
            return provider.GetRequiredService<IClientFactory>().CreateRequestClient<T>(destinationAddress, timeout);
        }

        /// <summary>
        /// Registers a generic request client provider in the container, which will be used for any
        /// client that is not explicitly registered using AddRequestClient.
        /// </summary>
        /// <param name="collection"></param>
        [Obsolete("This method is no longer required, the Generic Request Client is automatically registered")]
        public static IServiceCollection AddGenericRequestClient(this IServiceCollection collection)
        {
            return collection;
        }
    }
}


text:
package io.michaelrocks.lightsaber.access;

import javax.inject.Inject;

import io.michaelrocks.lightsaber.ProvidedBy;

@ProvidedBy(AccessModule.class)
class InternalGenericDependencyImpl implements InternalGenericDependency<InternalDependency> {
  @Inject
  public InternalGenericDependencyImpl() {
  }

  @Override
  public void action() {
  }

  @Inject
  private void privateMethod() {
  }

  @Inject
  void internalMethod() {
  }

  @Inject
  protected void protectedMethod() {
  }

  @Inject
  public void publicMethod() {
  }
}


text:
require "spec_helper"
require "pakyow/realtime/ext/app"

RSpec.describe Pakyow::App do
  describe "#socket" do
    it "creates a context with app instance" do
      expect(Pakyow::Realtime::Context).to receive(:new).with(instance_of(Pakyow::App))
      Pakyow::App.new.socket
    end

    it "returns a realtime context" do
      expect(Pakyow::App.new.socket).to be_instance_of(Pakyow::Realtime::Context)
    end
  end
end


text:
package edu.utah.ece.async.ibiosim.gui.util;

import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;

import javax.swing.*;
import javax.swing.event.*;
import javax.swing.tree.*;
import javax.xml.stream.XMLStreamException;

import org.sbolstandard.core2.SBOLConversionException;
import org.sbolstandard.core2.SBOLReader;
import org.sbolstandard.core2.SBOLValidationException;

import edu.utah.ece.async.ibiosim.dataModels.biomodel.parser.BioModel;
import edu.utah.ece.async.ibiosim.dataModels.biomodel.parser.GCM2SBML;
import edu.utah.ece.async.ibiosim.dataModels.sbol.SBOLUtility;
import edu.utah.ece.async.ibiosim.dataModels.util.GlobalConstants;
import edu.utah.ece.async.ibiosim.dataModels.util.exceptions.BioSimException;
import edu.utah.ece.async.ibiosim.dataModels.util.observe.PanelObservable;
import edu.utah.ece.async.ibiosim.gui.Gui;
import edu.utah.ece.async.ibiosim.gui.ResourceManager;

/**
 * Display a file system in a JTree view
 *
 * @author Chris Myers
 * @author <a href="http://www.async.ece.utah.edu/ibiosim#Credits"> iBioSim Contributors </a>
 * @version %I%
 */
public class FileTree extends PanelObservable implements MouseListener {

	private static final long serialVersionUID = -6799125543270861304L;

	private String fileLocation; // location of selected file

	private String[] fileLocations; // location of selected file

	private DefaultMutableTreeNode root; // root node

	private Gui gui;

	public JTree tree; // JTree

	private boolean lema, atacs, async, lpn;

	public static ImageIcon ICON_VHDL;

	public static ImageIcon ICON_S;

	public static ImageIcon ICON_INST;

	public static ImageIcon ICON_LHPN;

	public static ImageIcon ICON_PROP;

	public static ImageIcon ICON_VERILOG;

	public static ImageIcon ICON_CSP;

	public static ImageIcon ICON_HSE;

	public static ImageIcon ICON_UNC;

	public static ImageIcon ICON_RSG;

	public static ImageIcon ICON_MODEL;

	public static ImageIcon ICON_DOT;

	public static ImageIcon ICON_SBOL;

	public static ImageIcon ICON_SBML;

	public static ImageIcon ICON_SIMULATION;

	public static ImageIcon ICON_SYNTHESIS;

	public static ImageIcon ICON_VERIFY;

	public static ImageIcon ICON_PROJECT;

	public static ImageIcon ICON_GRAPH;

	public static ImageIcon ICON_PROBGRAPH;

	public static ImageIcon ICON_LEARN;

	public static ImageIcon ICON_MINUS;

	public static ImageIcon ICON_PLUS;

	/**
	 * Construct a FileTree
	 */
	public FileTree(final File dir, Gui gui, boolean lema, boolean atacs, boolean lpn) {
		this.lema = lema;
		this.atacs = atacs;
		this.lpn = lpn;
		this.gui = gui;
		async = lema || atacs;

		ICON_VHDL = ResourceManager.getImageIcon("iconVHDL.png");

		ICON_S = ResourceManager.getImageIcon("iconS.png");

		ICON_INST = ResourceManager.getImageIcon("iconInst.png");

		ICON_PROP = ResourceManager.getImageIcon("prop.png");

		ICON_LHPN = ResourceManager.getImageIcon("icon_pnlogo.gif");

		ICON_VERILOG = ResourceManager.getImageIcon("verilog.gif");

		ICON_CSP = ResourceManager.getImageIcon("iconCSP.png");

		ICON_HSE = ResourceManager.getImageIcon("iconHSE.png");

		ICON_UNC = ResourceManager.getImageIcon("iconUNC.png");

		ICON_RSG = ResourceManager.getImageIcon("iconRSG.png");

		ICON_MODEL = ResourceManager.getImageIcon("model.png");

		ICON_DOT = ResourceManager.getImageIcon("dot.jpg");

		ICON_SBOL = ResourceManager.getImageIcon("sbol.jpg");

		ICON_SBML = ResourceManager.getImageIcon("sbml.jpg");

		ICON_SIMULATION = ResourceManager.getImageIcon("simulation.jpg");

		ICON_SYNTHESIS = ResourceManager.getImageIcon("synth.png");

		ICON_VERIFY = ResourceManager.getImageIcon("check.png");

		ICON_PROJECT = ResourceManager.getImageIcon("project.jpg");

		ICON_GRAPH = ResourceManager.getImageIcon("graph.jpg");

		ICON_PROBGRAPH = ResourceManager.getImageIcon("probability.jpg");

		ICON_LEARN = ResourceManager.getImageIcon("learn.jpg");

		ICON_MINUS = ResourceManager.getImageIcon("treeMinus.gif");

		ICON_PLUS = ResourceManager.getImageIcon("treePlus.gif");

		setLayout(new BorderLayout());

		//this.dir = dir;
		// Make a tree list with all the nodes, and make it a JTree
		if (dir != null) {
			if (System.getProperty("os.name").toLowerCase().startsWith("mac os")) {
				tree = new JTree(addNodes(null, dir, true, false),false);
			} else {
				tree = new JTree(addNodes(null, dir, true, false),false);
				//tree.expandPath(tree.getLeadSelectionPath());
			}
			TreeCellRenderer renderer = new IconCellRenderer();
			tree.setCellRenderer(renderer);
			// Add a listener
			tree.addTreeSelectionListener(new TreeSelectionListener() {
				@Override
				public void valueChanged(TreeSelectionEvent e) {
					DefaultMutableTreeNode node = (DefaultMutableTreeNode) e.getPath().getLastPathComponent();
					fileLocation = "";
					while (node != null) {
						if (node.getParent() != null) {
							fileLocation = File.separator + node + fileLocation;
							String parentNode = node.getParent().toString();   //DK
							if (parentNode.endsWith(".xml") || parentNode.endsWith(".sbml") || parentNode.endsWith(".gcm")
									|| parentNode.endsWith(".vhd") ||  parentNode.endsWith(".prop") || parentNode.endsWith(".s") || parentNode.endsWith(".inst")
									|| parentNode.endsWith(".g") || parentNode.endsWith(".lpn") || parentNode.endsWith(".csp")
									|| parentNode.endsWith(".hse") || parentNode.endsWith(".unc") || parentNode.endsWith(".csp")
									|| parentNode.endsWith(".rsg") || parentNode.endsWith(".vams") || parentNode.endsWith(".sv") || parentNode.endsWith(".v")
									|| parentNode.endsWith(".grf") || parentNode.endsWith(".prb")) {
								node = (DefaultMutableTreeNode) node.getParent();
							}
						}
						node = (DefaultMutableTreeNode) node.getParent();
					}
					fileLocation = dir.getAbsolutePath() + fileLocation;

					// Lukas added :
					if(tree.getSelectionPaths() != null) {

					fileLocations = new String[tree.getSelectionPaths().length];
					int i = 0;
					for (TreePath path : tree.getSelectionPaths()) {
						node = (DefaultMutableTreeNode) path.getLastPathComponent();
						fileLocations[i] = "";
						while (node != null) {
							if (node.getParent() != null) {
								fileLocations[i] = File.separator + node + fileLocations[i];
								String parentNode = node.getParent().toString();   //DK
								if (parentNode.endsWith(".xml") || parentNode.endsWith(".sbml") || parentNode.endsWith(".gcm")
										|| parentNode.endsWith(".vhd") ||  parentNode.endsWith(".prop") || parentNode.endsWith(".s") || parentNode.endsWith(".inst")
										|| parentNode.endsWith(".g") || parentNode.endsWith(".lpn") || parentNode.endsWith(".csp")
										|| parentNode.endsWith(".hse") || parentNode.endsWith(".unc") || parentNode.endsWith(".csp")
										|| parentNode.endsWith(".rsg") || parentNode.endsWith(".vams") || parentNode.endsWith(".sv") || parentNode.endsWith(".v")
										|| parentNode.endsWith(".grf") || parentNode.endsWith(".prb")) {
									node = (DefaultMutableTreeNode) node.getParent();
								}
							}
							node = (DefaultMutableTreeNode) node.getParent();
						}
						fileLocations[i] = dir.getAbsolutePath() + fileLocations[i];
						i++;
					}
				}
				}
			});
			tree.addMouseListener(this);
			tree.addMouseListener(gui);
		}
		else {
			tree = new JTree(new DefaultMutableTreeNode());
		}

		// Lastly, put the JTree into a JScrollPane.
		JScrollPane scrollpane = new JScrollPane();
		scrollpane.getViewport().add(tree);
		add(BorderLayout.CENTER, scrollpane);
	}

	public void setExpandibleIcons(boolean defaults) {
		if (defaults) {
			UIManager.put("Tree.expandedIcon", Gui.ICON_EXPAND);
			UIManager.put("Tree.collapsedIcon", Gui.ICON_COLLAPSE);
		}
		else {
			UIManager.put("Tree.expandedIcon", ICON_MINUS);
			UIManager.put("Tree.collapsedIcon", ICON_PLUS);
		}
		Runnable updateTree = new Runnable() {
			@Override
			public void run() {
				tree.updateUI();
			}
		};
		SwingUtilities.invokeLater(updateTree);
	}

	/**
	 * Add nodes from under "dir" into curTop. Highly recursive.
	 */
	DefaultMutableTreeNode addNodes(DefaultMutableTreeNode curTop, File dir, boolean sim, boolean synth) {
		String curPath = dir.getPath();
		DefaultMutableTreeNode curDir;
		if (curTop == null) {
			curDir = new DefaultMutableTreeNode(new IconData(ICON_PROJECT, null, dir.getName()));
		}
		else {
			if (sim && synth) { // Verification node
				curDir = new DefaultMutableTreeNode(new IconData(ICON_VERIFY, null, dir.getName()));
			}
			else if (sim) {
				curDir = new DefaultMutableTreeNode(new IconData(ICON_SIMULATION, null, dir.getName()));
			}
			else if (synth) {
				curDir = new DefaultMutableTreeNode(new IconData(ICON_SYNTHESIS, null, dir.getName()));
			}
			else {
				curDir = new DefaultMutableTreeNode(new IconData(ICON_LEARN, null, dir.getName()));
			}
		}
		if (curTop != null) { // should only be null at root
			if (curTop.getParent() == null) {
				curTop.add(curDir);
			}
		}
		else {
			root = curDir;
		}
		ArrayList<String> ol = new ArrayList<String>();
		String[] tmp = dir.list();
		for (int i = 0; i < tmp.length; i++) {
			if (tmp[i].charAt(0) != '.') {
				ol.add(tmp[i]);
			}
		}
		Collections.sort(ol, String.CASE_INSENSITIVE_ORDER);
		File f;
		ArrayList<String> files = new ArrayList<String>();
		ArrayList<String> dirs = new ArrayList<String>();
		// Make two passes, one for Dirs and one for Files. This is #1.
		for (int i = 0; i < ol.size(); i++) {
			String thisObject = ol.get(i);
			String newPath;
			if (curPath.equals("."))
				newPath = thisObject;
			else
				newPath = curPath + File.separator + thisObject;
			if ((f = new File(newPath)).isDirectory() && !f.getName().equals("CVS")) {
				dirs.add(thisObject);
			}
			else if (!f.getName().equals("CVS"))
				if (!async && thisObject.toString().endsWith(".sbol")) {
					String sbolFile = thisObject.toString();
					if (!sbolFile.equals(gui.getCurrentProjectId()+".sbol")) {
						try {
							SBOLReader.setDropObjectsWithDuplicateURIs(true);
							gui.getSBOLDocument().read(curPath + File.separator + sbolFile);
							SBOLReader.setDropObjectsWithDuplicateURIs(false);
							gui.writeSBOLDocument();
							new File(curPath + File.separator + sbolFile).delete();
						}
						catch (SBOLValidationException e) {
							JOptionPane.showMessageDialog(Gui.frame, "SBOL file at " + curPath + File.separator + sbolFile + " is invalid.", "Invalid SBOL",
									JOptionPane.ERROR_MESSAGE);
							e.printStackTrace();
						}
						catch (IOException e) {
							JOptionPane.showMessageDialog(Gui.frame, "Unable to find this SBOL file at this location: " + curPath + File.separator + sbolFile + ".", "File Not Found",
									JOptionPane.ERROR_MESSAGE);
							e.printStackTrace();
						}
						catch (SBOLConversionException e) {
							JOptionPane.showMessageDialog(Gui.frame, "The output SBOLDocument of the generated model was unable to convert to SBML", "SBOL to SBML Conversion Failed",
									JOptionPane.ERROR_MESSAGE);
							e.printStackTrace();
						}
					}
				}
			if (!async && thisObject.toString().endsWith(".gcm")) {
				String sbmlFile = thisObject.replace(".gcm",".xml");
				BioModel bioModel =  BioModel.createBioModel(curPath, this);
				try {
					bioModel.load(curPath + File.separator + sbmlFile);
					GCM2SBML gcm2sbml = new GCM2SBML(bioModel);
					gcm2sbml.load(curPath + File.separator + thisObject.toString());
					System.out.println(curPath + File.separator + thisObject.toString());
					gcm2sbml.convertGCM2SBML(curPath,thisObject.toString());
					bioModel.save(curPath + File.separator + sbmlFile);
					files.add(sbmlFile);
				} catch (XMLStreamException e) {
					JOptionPane.showMessageDialog(Gui.frame, "Invalid XML in SBML file", "Error Checking File", JOptionPane.ERROR_MESSAGE);
					e.printStackTrace();
				} catch (IOException e) {
					JOptionPane.showMessageDialog(Gui.frame, "I/O error when opening SBML file", "Error Opening File", JOptionPane.ERROR_MESSAGE);
					e.printStackTrace();
				}
				catch (BioSimException e) {
	        JOptionPane.showMessageDialog(Gui.frame, e.getMessage(), e.getTitle(),
	          JOptionPane.ERROR_MESSAGE);
	        e.printStackTrace();
	      }

			}
			else {
				files.add(thisObject);
			}
		}
		// Pass two: for files.
		for (int fnum = 0; fnum < files.size(); fnum++) {
			DefaultMutableTreeNode file = null;
			if (curDir.getParent() == null) {
				if (!atacs && files.get(fnum).toString().endsWith(".sbml") ||
						!atacs && files.get(fnum).toString().endsWith(".xml")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_SBML, null, files.get(fnum)));
				}
				else if (!async && files.get(fnum).toString().endsWith(".sbol") &&
						(files.get(fnum).equals(gui.getCurrentProjectId()+".sbol"))) {
					file = new DefaultMutableTreeNode(new IconData(ICON_SBOL, null, files.get(fnum)));
				}
				else if (!async && files.get(fnum).toString().endsWith(".v")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_VERILOG, null, files.get(fnum)));
				}
				else if (async && files.get(fnum).toString().endsWith(".vhd")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_VHDL, null, files.get(fnum)));
				}
				else if (async && files.get(fnum).toString().endsWith(".prop")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_PROP, null, files.get(fnum)));
				}
				else if (lema && files.get(fnum).toString().endsWith(".s")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_S, null, files.get(fnum)));
				}
				else if (lema && files.get(fnum).toString().endsWith(".inst")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_INST, null, files.get(fnum)));
				}
				else if (atacs && files.get(fnum).toString().endsWith(".g")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_LHPN, null, files.get(fnum)));
				}
				else if (lpn && files.get(fnum).toString().endsWith(".lpn")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_LHPN, null, files.get(fnum)));
				}
				else if (atacs && files.get(fnum).toString().endsWith("csp")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_CSP, null, files.get(fnum)));
				}
				else if (atacs && files.get(fnum).toString().endsWith(".hse")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_HSE, null, files.get(fnum)));
				}
				else if (atacs && files.get(fnum).toString().endsWith(".unc")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_UNC, null, files.get(fnum)));
				}
				else if (atacs && files.get(fnum).toString().endsWith(".rsg")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_RSG, null, files.get(fnum)));
				}
				else if (lema && files.get(fnum).toString().endsWith(".vams")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_VERILOG, null, files.get(fnum)));
				}
				else if (lema && files.get(fnum).toString().endsWith(".sv")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_VERILOG, null, files.get(fnum)));
				}
				else if (files.get(fnum).toString().endsWith(".grf")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_GRAPH, null, files.get(fnum)));
				}
				else if (files.get(fnum).toString().endsWith(".prb")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_PROBGRAPH, null, files.get(fnum)));
				}
			}
			else if (!(curDir.getParent().toString().equals(root.toString()))) {
				if (!atacs && files.get(fnum).toString().endsWith(".sbml") ||
					!atacs && files.get(fnum).toString().endsWith(".xml")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_SBML, null, files.get(fnum)));
				} else if (!async && files.get(fnum).toString().endsWith(".sbol")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_SBOL, null, files.get(fnum)));
				}
				else if (!async && files.get(fnum).toString().endsWith(".v")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_VERILOG, null, files.get(fnum)));
				}
				else if (async && files.get(fnum).toString().endsWith(".vhd")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_VHDL, null, files.get(fnum)));
				}
				else if (async && files.get(fnum).toString().endsWith(".prop")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_PROP, null, files.get(fnum)));
				}
				else if (lema && files.get(fnum).toString().endsWith(".s")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_S, null, files.get(fnum)));
				}
				else if (lema && files.get(fnum).toString().endsWith(".inst")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_INST, null, files.get(fnum)));
				}
				else if (atacs && files.get(fnum).toString().endsWith(".g")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_LHPN, null, files.get(fnum)));
				}
				else if (lpn && files.get(fnum).toString().endsWith(".lpn")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_LHPN, null, files.get(fnum)));
				}
				else if (atacs && files.get(fnum).toString().endsWith(".csp")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_CSP, null, files.get(fnum)));
				}
				else if (atacs && files.get(fnum).toString().endsWith(".hse")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_HSE, null, files.get(fnum)));
				}
				else if (atacs && files.get(fnum).toString().endsWith(".unc")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_UNC, null, files.get(fnum)));
				}
				else if (atacs && files.get(fnum).toString().endsWith(".rsg")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_RSG, null, files.get(fnum)));
				}
				else if (lema && files.get(fnum).toString().endsWith(".vams")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_VERILOG, null, files.get(fnum)));
				}
				else if (lema && files.get(fnum).toString().endsWith(".sv")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_VERILOG, null, files.get(fnum)));
				}
				else if (files.get(fnum).toString().endsWith(".grf")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_GRAPH, null, files.get(fnum)));
				}
				else if (files.get(fnum).toString().endsWith(".prb")) {
					file = new DefaultMutableTreeNode(new IconData(ICON_PROBGRAPH, null, files.get(fnum)));
				}
			}
			if (file != null) {
				for (String d : dirs) {
					String newPath;
					if (curPath.equals("."))
						newPath = d;
					else
						newPath = curPath + File.separator + d;
					f = new File(newPath);
					if (new File(newPath + File.separator + d + ".sim").exists()) {
						try {
							Scanner scan = new Scanner(new File(newPath + File.separator + d + ".sim"));
							String refFile = scan.nextLine();
							if (refFile.equals(files.get(fnum)) || refFile.replace(".gcm", ".xml").equals(files.get(fnum))) {
								file.add(new DefaultMutableTreeNode(new IconData(ICON_SIMULATION, null, d)));
							}
							scan.close();
						}
						catch (Exception e) {
							e.printStackTrace();
						}
					} else if (new File(newPath + File.separator + d + GlobalConstants.SBOL_SYNTH_PROPERTIES_EXTENSION).exists()) {
						try {
							Properties synthProps = SBOLUtility.getSBOLUtility().loadSBOLSynthesisProperties(newPath, File.separator, Gui.frame);
							if (synthProps != null)
								if (synthProps.containsKey(GlobalConstants.SBOL_SYNTH_SPEC_PROPERTY)) {
									String refFile = synthProps.getProperty(GlobalConstants.SBOL_SYNTH_SPEC_PROPERTY);
									if (refFile.equals(files.get(fnum)) || refFile.replace(".gcm", ".xml").equals(files.get(fnum))) {
										file.add(new DefaultMutableTreeNode(new IconData(ICON_SYNTHESIS, null, d)));
									}
								} else
									JOptionPane.showMessageDialog(Gui.frame, "Synthesis specification property is missing.", "Missing Property", JOptionPane.ERROR_MESSAGE);
						}
						catch (Exception e) {
							e.printStackTrace();
						}
					} else if (new File(newPath + File.separator + d + ".lrn").exists()) {
						try {
							Properties load = new Properties();
							FileInputStream in = new FileInputStream(new File(newPath + File.separator + d + ".lrn"));
							load.load(in);
							in.close();
							if (load.containsKey("genenet.file")) {
								String[] getProp = GlobalConstants.splitPath(load.getProperty("genenet.file"));
								if (files.get(fnum).equals(getProp[getProp.length - 1])
										|| files.get(fnum).equals(getProp[getProp.length - 1].replace(".gcm", ".xml"))) {
									file.add(new DefaultMutableTreeNode(new IconData(ICON_LEARN, null, d)));
								}
							}
							else if (load.containsKey("learn.file")) {
								String[] getProp = GlobalConstants.splitPath(load.getProperty("learn.file"));
								if (files.get(fnum).equals(getProp[getProp.length - 1])
										|| files.get(fnum).equals(getProp[getProp.length - 1].replace(".gcm", ".xml"))) {
									file.add(new DefaultMutableTreeNode(new IconData(ICON_LEARN, null, d)));
								}
							}
						}
						catch (Exception e) {
							e.printStackTrace();
						}
					}
					else if (new File(newPath + File.separator + d + ".syn").exists()) {
						try {
							Properties load = new Properties();
							FileInputStream in = new FileInputStream(new File(newPath + File.separator + d + ".syn"));
							load.load(in);
							in.close();
							if (load.containsKey("synthesis.file")) {
								String[] getProp = GlobalConstants.splitPath(load.getProperty("synthesis.file"));
								if (files.get(fnum).equals(getProp[getProp.length - 1])) {
									file.add(new DefaultMutableTreeNode(new IconData(ICON_SYNTHESIS, null, d)));
								}
							}
						}
						catch (Exception e) {
							e.printStackTrace();
						}
					}
					else if (new File(newPath + File.separator + d + ".ver").exists()) {
						try {
							Properties load = new Properties();
							FileInputStream in = new FileInputStream(new File(newPath + File.separator + d + ".ver"));
							load.load(in);
							in.close();
							if (load.containsKey("verification.file")) {
								String[] getProp = GlobalConstants.splitPath(load.getProperty("verification.file"));
								if (files.get(fnum).equals(getProp[getProp.length - 1])) {
									file.add(new DefaultMutableTreeNode(new IconData(ICON_VERIFY, null, d)));
								}
							}
						}
						catch (Exception e) {
							e.printStackTrace();
						}
					}
				}
				curDir.add(file);
			}
		}
		return curDir;
	}

	public String getFile() {
		return fileLocation;
	}

	public String[] getFiles() {
		return fileLocations;
	}

	public void addToTree(String item, String dir) {
		deleteFromTree(item);
		String path = dir + File.separator + item;
		File file = new File(dir + File.separator + item);
		if (file.isDirectory()) {
			if (new File(path + File.separator + item + ".sim").exists()) {
				try {
					Scanner scan = new Scanner(new File(path + File.separator + item + ".sim"));
					String refFile = scan.nextLine();
					scan.close();
					for (int i = 0; i < root.getChildCount(); i++) {
						if (root.getChildAt(i).toString().equals(refFile) || root.getChildAt(i).toString().equals(refFile.replace(".gcm", ".xml"))) {
							int insert = 0;
							for (int j = 0; j < root.getChildAt(i).getChildCount(); j++) {
								if (root.getChildAt(i).getChildAt(j).toString().compareToIgnoreCase(item) < 0) {
									insert++;
								}
							}
							((DefaultMutableTreeNode) root.getChildAt(i)).insert(
									new DefaultMutableTreeNode(new IconData(ICON_SIMULATION, null, item)), insert);
							Runnable updateTree = new Runnable() {
								@Override
								public void run() {
									tree.updateUI();
								}
							};
							SwingUtilities.invokeLater(updateTree);
							return;
						}
					}
				}
				catch (Exception e) {
					e.printStackTrace();
				}
			} else if (new File(path + File.separator + item + GlobalConstants.SBOL_SYNTH_PROPERTIES_EXTENSION).exists()) {
				try {
					Properties synthProps = SBOLUtility.getSBOLUtility().loadSBOLSynthesisProperties(path, File.separator, Gui.frame);
					if (synthProps != null) {
						if (synthProps.containsKey(GlobalConstants.SBOL_SYNTH_SPEC_PROPERTY)) {
							String refFile = synthProps.getProperty(GlobalConstants.SBOL_SYNTH_SPEC_PROPERTY);
							for (int i = 0; i < root.getChildCount(); i++) {
								if (root.getChildAt(i).toString().equals(refFile) || root.getChildAt(i).toString().equals(refFile.replace(".gcm", ".xml"))) {
									int insert = 0;
									for (int j = 0; j < root.getChildAt(i).getChildCount(); j++) {
										if (root.getChildAt(i).getChildAt(j).toString().compareToIgnoreCase(item) < 0) {
											insert++;
										}
									}
									((DefaultMutableTreeNode) root.getChildAt(i)).insert(
											new DefaultMutableTreeNode(new IconData(ICON_SYNTHESIS, null, item)), insert);
									Runnable updateTree = new Runnable() {
										@Override
										public void run() {
											tree.updateUI();
										}
									};
									SwingUtilities.invokeLater(updateTree);
									return;
								}
							}
						} else
							JOptionPane.showMessageDialog(Gui.frame, "Synthesis specification property is missing.", "Missing Property", JOptionPane.ERROR_MESSAGE);
					}
				}
				catch (Exception e) {
					e.printStackTrace();
				}
			} else if (new File(path + File.separator + item + ".lrn").exists()) {
				try {
					Properties load = new Properties();
					FileInputStream in = new FileInputStream(new File(path + File.separator + item + ".lrn"));
					load.load(in);
					in.close();
					if (load.containsKey("genenet.file")) {
						String[] getProp = GlobalConstants.splitPath(load.getProperty("genenet.file"));
						for (int i = 0; i < root.getChildCount(); i++) {
							if (root.getChildAt(i).toString().equals(getProp[getProp.length - 1])
									|| root.getChildAt(i).toString().equals(getProp[getProp.length - 1].replace(".gcm", ".xml"))) {
								int insert = 0;
								for (int j = 0; j < root.getChildAt(i).getChildCount(); j++) {
									if (root.getChildAt(i).getChildAt(j).toString().compareToIgnoreCase(item) < 0) {
										insert++;
									}
								}
								((DefaultMutableTreeNode) root.getChildAt(i)).insert(
										new DefaultMutableTreeNode(new IconData(ICON_LEARN, null, item)), insert);
								Runnable updateTree = new Runnable() {
									@Override
									public void run() {
										tree.updateUI();
									}
								};
								SwingUtilities.invokeLater(updateTree);
								return;
							}
						}
					}
					else if (load.containsKey("learn.file")) {
						String[] getProp = GlobalConstants.splitPath(load.getProperty("learn.file"));
						for (int i = 0; i < root.getChildCount(); i++) {
							if (root.getChildAt(i).toString().equals(getProp[getProp.length - 1])
									|| root.getChildAt(i).toString().equals(getProp[getProp.length - 1].replace(".gcm", ".xml"))) {
								int insert = 0;
								for (int j = 0; j < root.getChildAt(i).getChildCount(); j++) {
									if (root.getChildAt(i).getChildAt(j).toString().compareToIgnoreCase(item) < 0) {
										insert++;
									}
								}
								((DefaultMutableTreeNode) root.getChildAt(i)).insert(
										new DefaultMutableTreeNode(new IconData(ICON_LEARN, null, item)), insert);
								Runnable updateTree = new Runnable() {
									@Override
									public void run() {
										tree.updateUI();
									}
								};
								SwingUtilities.invokeLater(updateTree);
								return;
							}
						}
					}
				}
				catch (Exception e) {
					e.printStackTrace();
				}
			}
			else if (new File(path + File.separator + item + ".syn").exists()) {
				try {
					Properties load = new Properties();
					FileInputStream in = new FileInputStream(new File(path + File.separator + item + ".syn"));
					load.load(in);
					in.close();
					if (load.containsKey("synthesis.file")) {
						String[] getProp = GlobalConstants.splitPath(load.getProperty("synthesis.file"));
						for (int i = 0; i < root.getChildCount(); i++) {
							if (root.getChildAt(i).toString().equals(getProp[getProp.length - 1])) {
								int insert = 0;
								for (int j = 0; j < root.getChildAt(i).getChildCount(); j++) {
									if (root.getChildAt(i).getChildAt(j).toString().compareToIgnoreCase(item) < 0) {
										insert++;
									}
								}
								((DefaultMutableTreeNode) root.getChildAt(i)).insert(new DefaultMutableTreeNode(new IconData(ICON_SYNTHESIS, null,
										item)), insert);
								Runnable updateTree = new Runnable() {
									@Override
									public void run() {
										tree.updateUI();
									}
								};
								SwingUtilities.invokeLater(updateTree);
								return;
							}
						}
					}
				}
				catch (Exception e) {
					e.printStackTrace();
				}
			}
			else if (new File(path + File.separator + item + ".ver").exists()) {
				try {
					Properties load = new Properties();
					FileInputStream in = new FileInputStream(new File(path + File.separator + item + ".ver"));
					load.load(in);
					in.close();
					if (load.containsKey("verification.file")) {
						String[] getProp = GlobalConstants.splitPath(load.getProperty("verification.file"));
						for (int i = 0; i < root.getChildCount(); i++) {
							if (root.getChildAt(i).toString().equals(getProp[getProp.length - 1])) {
								int insert = 0;
								for (int j = 0; j < root.getChildAt(i).getChildCount(); j++) {
									if (root.getChildAt(i).getChildAt(j).toString().compareToIgnoreCase(item) < 0) {
										insert++;
									}
								}
								((DefaultMutableTreeNode) root.getChildAt(i)).insert(
										new DefaultMutableTreeNode(new IconData(ICON_VERIFY, null, item)), insert);
								Runnable updateTree = new Runnable() {
									@Override
									public void run() {
										tree.updateUI();
									}
								};
								SwingUtilities.invokeLater(updateTree);
								return;
							}
						}
					}
				}
				catch (Exception e) {
					e.printStackTrace();
				}
			}
		}
		else {
			DefaultMutableTreeNode node = null;
			int insert = 0;
			for (int i = 0; i < root.getChildCount(); i++) {
				if (root.getChildAt(i).toString().compareToIgnoreCase(item) < 0) {
					insert++;
				}
			}
			if (!atacs && item.endsWith(".sbml") || !atacs && item.endsWith(".xml")) {
				node = new DefaultMutableTreeNode(new IconData(ICON_SBML, null, item));
			} else if (!async && item.endsWith(".sbol")) {
				node = new DefaultMutableTreeNode(new IconData(ICON_SBOL, null, item));
			}
			else if (!async && item.endsWith(".v")) {
				node = new DefaultMutableTreeNode(new IconData(ICON_VERILOG, null, item));
			}
			else if (async && item.endsWith(".vhd")) {
				node = new DefaultMutableTreeNode(new IconData(ICON_VHDL, null, item));
			}
			else if (async && item.endsWith(".prop")) {  //DK
				node = new DefaultMutableTreeNode(new IconData(ICON_PROP, null, item));
			}
			else if (lema && item.endsWith(".s")) {
				node = new DefaultMutableTreeNode(new IconData(ICON_S, null, item));
			}
			else if (lema && item.endsWith(".inst")) {
				node = new DefaultMutableTreeNode(new IconData(ICON_INST, null, item));
			}
			else if (atacs && item.endsWith(".g")) {
				node = new DefaultMutableTreeNode(new IconData(ICON_LHPN, null, item));
			}
			else if (lpn && item.endsWith(".lpn")) {
				node = new DefaultMutableTreeNode(new IconData(ICON_LHPN, null, item));
			}
			else if (atacs && item.endsWith(".csp")) {
				node = new DefaultMutableTreeNode(new IconData(ICON_CSP, null, item));
			}
			else if (atacs && item.endsWith(".hse")) {
				node = new DefaultMutableTreeNode(new IconData(ICON_HSE, null, item));
			}
			else if (atacs && item.endsWith(".unc")) {
				node = new DefaultMutableTreeNode(new IconData(ICON_UNC, null, item));
			}
			else if (atacs && item.endsWith(".rsg")) {
				node = new DefaultMutableTreeNode(new IconData(ICON_RSG, null, item));
			}
			else if (lema && item.endsWith(".vams")) {
				node = new DefaultMutableTreeNode(new IconData(ICON_VERILOG, null, item));
			}
			else if (lema && item.endsWith(".sv")) {
				node = new DefaultMutableTreeNode(new IconData(ICON_VERILOG, null, item));
			}
			else if (item.endsWith(".grf")) {
				node = new DefaultMutableTreeNode(new IconData(ICON_GRAPH, null, item));
			}
			else if (item.endsWith(".prb")) {
				node = new DefaultMutableTreeNode(new IconData(ICON_PROBGRAPH, null, item));
			}
			if (node != null) {
				String[] files = new File(dir).list();
				sort(files);
				for (String f : files) {
					path = dir + File.separator + f;
					if (new File(path).isDirectory()) {
						if (new File(path + File.separator + f + ".sim").exists()) {
							try {
								Scanner scan = new Scanner(new File(path + File.separator + f + ".sim"));
								String refFile = scan.nextLine();
								scan.close();
								if (item.equals(refFile) || item.equals(refFile.replace(".gcm", ".xml"))) {
									node.add(new DefaultMutableTreeNode(new IconData(ICON_SIMULATION, null, f)));
								}
							}
							catch (Exception e) {
								e.printStackTrace();
							}
						}
						else if (new File(path + File.separator + f + ".lrn").exists()) {
							try {
								Properties load = new Properties();
								FileInputStream in = new FileInputStream(new File(path + File.separator + f + ".lrn"));
								load.load(in);
								in.close();
								if (load.containsKey("genenet.file")) {
									String[] getProp = GlobalConstants.splitPath(load.getProperty("genenet.file"));
									if (item.equals(getProp[getProp.length - 1]) || item.equals(getProp[getProp.length - 1].replace(".gcm", ".xml"))) {
										node.add(new DefaultMutableTreeNode(new IconData(ICON_LEARN, null, f)));
									}
								}
								else if (load.containsKey("learn.file")) {
									String[] getProp = GlobalConstants.splitPath(load.getProperty("learn.file"));
									if (item.equals(getProp[getProp.length - 1]) || item.equals(getProp[getProp.length - 1].replace(".gcm", ".xml"))) {
										node.add(new DefaultMutableTreeNode(new IconData(ICON_LEARN, null, f)));
									}
								}
							}
							catch (Exception e) {
								e.printStackTrace();
							}
						}
						else if (new File(path + File.separator + f + ".syn").exists()) {
							try {
								Properties load = new Properties();
								FileInputStream in = new FileInputStream(new File(path + File.separator + f + ".syn"));
								load.load(in);
								in.close();
								if (load.containsKey("synthesis.file")) {
									String[] getProp = GlobalConstants.splitPath(load.getProperty("synthesis.file"));
									if (item.equals(getProp[getProp.length - 1])) {
										node.add(new DefaultMutableTreeNode(new IconData(ICON_SYNTHESIS, null, f)));
									}
								}
							}
							catch (Exception e) {
								e.printStackTrace();
							}
						}
						else if (new File(path + File.separator + f + ".ver").exists()) {
							try {
								Properties load = new Properties();
								FileInputStream in = new FileInputStream(new File(path + File.separator + f + ".ver"));
								load.load(in);
								in.close();
								if (load.containsKey("verification.file")) {
									String[] getProp = GlobalConstants.splitPath(load.getProperty("verification.file"));
									if (item.equals(getProp[getProp.length - 1])) {
										node.add(new DefaultMutableTreeNode(new IconData(ICON_VERIFY, null, f)));
									}
								}
							}
							catch (Exception e) {
								e.printStackTrace();
							}
						}
					}
				}
				root.insert(node, insert);
				tree.expandPath(new TreePath(root.getPath()));
				Runnable updateTree = new Runnable() {
					@Override
					public void run() {
						tree.updateUI();
					}
				};
				SwingUtilities.invokeLater(updateTree);
				return;
			}
		}
	}

	public void expandPath(DefaultMutableTreeNode node) {
		tree.expandPath(new TreePath(node.getPath()));
	}

	private static void sort(Object[] sort) {
		int i, j;
		String index;
		for (i = 1; i < sort.length; i++) {
			index = (String) sort[i];
			j = i;
			while ((j > 0) && ((String) sort[j - 1]).compareToIgnoreCase(index) > 0) {
				sort[j] = sort[j - 1];
				j = j - 1;
			}
			sort[j] = index;
		}
	}

	public void deleteFromTree(String item) {
		for (int i = 0; i < root.getChildCount(); i++) {
			if (root.getChildAt(i).toString().equals(item)) {
				root.remove(i);
				Runnable updateTree = new Runnable() {
					@Override
					public void run() {
						tree.updateUI();
					}
				};
				SwingUtilities.invokeLater(updateTree);
				return;
			}
			for (int j = 0; j < root.getChildAt(i).getChildCount(); j++) {
				if (root.getChildAt(i).getChildAt(j).toString().equals(item)) {
					((DefaultMutableTreeNode) root.getChildAt(i)).remove(j);
					Runnable updateTree = new Runnable() {
						@Override
						public void run() {
							tree.updateUI();
						}
					};
					SwingUtilities.invokeLater(updateTree);
					return;
				}
			}
		}
	}

	public DefaultMutableTreeNode getRoot() {
		return root;
	}

	@Override
	public Dimension getMinimumSize() {
		return new Dimension(200, 400);
	}

	@Override
	public Dimension getPreferredSize() {
		return new Dimension(200, 400);
	}

	@Override
	public void mouseClicked(MouseEvent e) {
	}

	@Override
	public void mousePressed(MouseEvent e) {
		if (!e.isPopupTrigger())
			return;

		int selRow = tree.getRowForLocation(e.getX(), e.getY());
		if (selRow < 0)
			return;

		TreePath selPath = tree.getPathForLocation(e.getX(), e.getY());
		tree.setSelectionPath(selPath);
	}

	@Override
	public void mouseReleased(MouseEvent e) {
		if (!e.isPopupTrigger())
			return;

		int selRow = tree.getRowForLocation(e.getX(), e.getY());
		if (selRow < 0)
			return;

		TreePath selPath = tree.getPathForLocation(e.getX(), e.getY());
		tree.setSelectionPath(selPath);
	}

	@Override
	public void mouseEntered(MouseEvent e) {
	}

	@Override
	public void mouseExited(MouseEvent e) {
	}

	class IconCellRenderer extends JLabel implements TreeCellRenderer {
		/**
		 *
		 */
		private static final long serialVersionUID = 4060683095197368584L;

		protected Color m_textSelectionColor;

		protected Color m_textNonSelectionColor;

		protected Color m_bkSelectionColor;

		protected Color m_bkNonSelectionColor;

		protected Color m_borderSelectionColor;

		protected boolean m_selected;

		public IconCellRenderer() {
			super();
			m_textSelectionColor = UIManager.getColor("Tree.selectionForeground");
			m_textNonSelectionColor = UIManager.getColor("Tree.textForeground");
			m_bkSelectionColor = UIManager.getColor("Tree.selectionBackground");
			m_bkNonSelectionColor = UIManager.getColor("Tree.textBackground");
			m_borderSelectionColor = UIManager.getColor("Tree.selectionBorderColor");
			setOpaque(false);
		}

		@Override
		public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus)

		{
			DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
			Object obj = node.getUserObject();
			setText(obj.toString());

			if (obj instanceof Boolean)
				setText("Retrieving data...");

			if (obj instanceof IconData) {
				IconData idata = (IconData) obj;
				if (expanded)
					setIcon(idata.getExpandedIcon());
				else
					setIcon(idata.getIcon());
			}
			else
				setIcon(null);

			setFont(tree.getFont());
			setForeground(sel ? m_textSelectionColor : m_textNonSelectionColor);
			setBackground(sel ? m_bkSelectionColor : m_bkNonSelectionColor);
			m_selected = sel;
			return this;
		}

		@Override
		public void paintComponent(Graphics g) {
			Color bColor = getBackground();
			Icon icon = getIcon();

			g.setColor(bColor);
			int offset = 0;
			if (icon != null && getText() != null)
				offset = (icon.getIconWidth() + getIconTextGap());
			g.fillRect(offset, 0, getWidth() - 1 - offset, getHeight() - 1);

			if (m_selected) {
				g.setColor(m_borderSelectionColor);
				g.drawRect(offset, 0, getWidth() - 1 - offset, getHeight() - 1);
			}
			super.paintComponent(g);
		}
	}

	class IconData {
		protected Icon m_icon;

		protected Icon m_expandedIcon;

		protected Object m_data;

		public IconData(Icon icon, Object data) {
			m_icon = icon;
			m_expandedIcon = null;
			m_data = data;
		}

		public IconData(Icon icon, Icon expandedIcon, Object data) {
			m_icon = icon;
			m_expandedIcon = expandedIcon;
			m_data = data;
		}

		public Icon getIcon() {
			return m_icon;
		}

		public Icon getExpandedIcon() {
			return m_expandedIcon != null ? m_expandedIcon : m_icon;
		}

		public Object getObject() {
			return m_data;
		}

		@Override
		public String toString() {
			return m_data.toString();
		}
	}
}


text:
var http = require('http');
//var fs = require('fs');
var fs = require('graceful-fs'); // npm install graceful-fs

var fileContents;

function listener(request, response) {
  response.end(fileContents);
}

function read(err, contents) {
  if (err) {
    console.error(err); // DON'T DO THIS IN PRODUCTION
    process.exit(1);
  } else {
    fileContents = contents;
    server.listen(1337);
  }
}
fs.readFile(require.main.filename, read);

var server = http.createServer(listener);
server.listen(1337);


text:
% Compute the rich club metric for a graph.
% Source: Colizza, Flammini, Serrano, Vespignani, "Detecting rich-club ordering in complex networks", Nature Physics, vol 2, Feb 2006
%
% INPUTs: adjacency matrix, nxn, k - threshold number of links
% OUTPUTs: rich club metric
%
% Other routines used: degrees.m, subgraph.m, numEdges.m
% GB: last updated, October 1, 2012
##################################################################

function phi=richClubMetric(adj,k)

[deg,~,~]=degrees(adj);

Nk=find(deg>=k);       % find the nodes with degree > k
if isempty(Nk); phi = 0; return; end

adjk=subgraph(adj,Nk);
phi=2*numEdges(adjk)/(length(Nk)*(length(Nk)-1));


text:
@class COTopic;
@interface COTopicDetailController : COBaseViewController

@property (nonatomic, strong) COTopic *topic;

- (void)dismissPopover;

@end


text:
/**
 * # __mockes__/react-native.js
 *
 * This class stubs out the React-Native classes with React classes
 */
'use string';
/**
 * ## Imports
 *
 * ReactNative is actually React
 */
import React from 'react';
const ReactNative = React;

/**
 * ## These need additional mocking
 *
 * ReactNative is actually React
 */
ReactNative.StyleSheet = {
    create: function create(styles) {
        return styles;
    }
};
class View extends React.Component {
    render() { return false; }
}
class PixelRatio extends React.Component {
    static get() { return 1; }
}
/**
 * ## Stubs
 *
 * Simple replacements for testing
 */
ReactNative.View = View;
ReactNative.ScrollView = View;
ReactNative.Text = View;
ReactNative.TouchableOpacity = View;
ReactNative.TouchableWithoutFeedback = View;
ReactNative.ToolbarAndroid = View;
ReactNative.Image = View;
ReactNative.PixelRatio = PixelRatio;
ReactNative.NativeModules= {};

ReactNative.Platform = {};

module.exports = ReactNative;


text:
"""Support for LCN binary sensors."""
import pypck

from homeassistant.components.binary_sensor import (
    DOMAIN as DOMAIN_BINARY_SENSOR,
    BinarySensorEntity,
)
from homeassistant.const import CONF_ADDRESS, CONF_DOMAIN, CONF_ENTITIES, CONF_SOURCE

from . import LcnEntity
from .const import BINSENSOR_PORTS, CONF_DOMAIN_DATA, SETPOINTS
from .helpers import get_device_connection

def create_lcn_binary_sensor_entity(hass, entity_config, config_entry):
    """Set up an entity for this domain."""
    device_connection = get_device_connection(
        hass, tuple(entity_config[CONF_ADDRESS]), config_entry
    )

    if entity_config[CONF_DOMAIN_DATA][CONF_SOURCE] in SETPOINTS:
        return LcnRegulatorLockSensor(
            entity_config, config_entry.entry_id, device_connection
        )
    if entity_config[CONF_DOMAIN_DATA][CONF_SOURCE] in BINSENSOR_PORTS:
        return LcnBinarySensor(entity_config, config_entry.entry_id, device_connection)
    # in KEY
    return LcnLockKeysSensor(entity_config, config_entry.entry_id, device_connection)

async def async_setup_entry(hass, config_entry, async_add_entities):
    """Set up LCN switch entities from a config entry."""
    entities = []

    for entity_config in config_entry.data[CONF_ENTITIES]:
        if entity_config[CONF_DOMAIN] == DOMAIN_BINARY_SENSOR:
            entities.append(
                create_lcn_binary_sensor_entity(hass, entity_config, config_entry)
            )

    async_add_entities(entities)

class LcnRegulatorLockSensor(LcnEntity, BinarySensorEntity):
    """Representation of a LCN binary sensor for regulator locks."""

    def __init__(self, config, entry_id, device_connection):
        """Initialize the LCN binary sensor."""
        super().__init__(config, entry_id, device_connection)

        self.setpoint_variable = pypck.lcn_defs.Var[
            config[CONF_DOMAIN_DATA][CONF_SOURCE]
        ]

        self._value = None

    async def async_added_to_hass(self):
        """Run when entity about to be added to hass."""
        await super().async_added_to_hass()
        if not self.device_connection.is_group:
            await self.device_connection.activate_status_request_handler(
                self.setpoint_variable
            )

    async def async_will_remove_from_hass(self):
        """Run when entity will be removed from hass."""
        await super().async_will_remove_from_hass()
        if not self.device_connection.is_group:
            await self.device_connection.cancel_status_request_handler(
                self.setpoint_variable
            )

    @property
    def is_on(self):
        """Return true if the binary sensor is on."""
        return self._value

    def input_received(self, input_obj):
        """Set sensor value when LCN input object (command) is received."""
        if (
            not isinstance(input_obj, pypck.inputs.ModStatusVar)
            or input_obj.get_var() != self.setpoint_variable
        ):
            return

        self._value = input_obj.get_value().is_locked_regulator()
        self.async_write_ha_state()

class LcnBinarySensor(LcnEntity, BinarySensorEntity):
    """Representation of a LCN binary sensor for binary sensor ports."""

    def __init__(self, config, entry_id, device_connection):
        """Initialize the LCN binary sensor."""
        super().__init__(config, entry_id, device_connection)

        self.bin_sensor_port = pypck.lcn_defs.BinSensorPort[
            config[CONF_DOMAIN_DATA][CONF_SOURCE]
        ]

        self._value = None

    async def async_added_to_hass(self):
        """Run when entity about to be added to hass."""
        await super().async_added_to_hass()
        if not self.device_connection.is_group:
            await self.device_connection.activate_status_request_handler(
                self.bin_sensor_port
            )

    async def async_will_remove_from_hass(self):
        """Run when entity will be removed from hass."""
        await super().async_will_remove_from_hass()
        if not self.device_connection.is_group:
            await self.device_connection.cancel_status_request_handler(
                self.bin_sensor_port
            )

    @property
    def is_on(self):
        """Return true if the binary sensor is on."""
        return self._value

    def input_received(self, input_obj):
        """Set sensor value when LCN input object (command) is received."""
        if not isinstance(input_obj, pypck.inputs.ModStatusBinSensors):
            return

        self._value = input_obj.get_state(self.bin_sensor_port.value)
        self.async_write_ha_state()

class LcnLockKeysSensor(LcnEntity, BinarySensorEntity):
    """Representation of a LCN sensor for key locks."""

    def __init__(self, config, entry_id, device_connection):
        """Initialize the LCN sensor."""
        super().__init__(config, entry_id, device_connection)

        self.source = pypck.lcn_defs.Key[config[CONF_DOMAIN_DATA][CONF_SOURCE]]
        self._value = None

    async def async_added_to_hass(self):
        """Run when entity about to be added to hass."""
        await super().async_added_to_hass()
        if not self.device_connection.is_group:
            await self.device_connection.activate_status_request_handler(self.source)

    async def async_will_remove_from_hass(self):
        """Run when entity will be removed from hass."""
        await super().async_will_remove_from_hass()
        if not self.device_connection.is_group:
            await self.device_connection.cancel_status_request_handler(self.source)

    @property
    def is_on(self):
        """Return true if the binary sensor is on."""
        return self._value

    def input_received(self, input_obj):
        """Set sensor value when LCN input object (command) is received."""
        if (
            not isinstance(input_obj, pypck.inputs.ModStatusKeyLocks)
            or self.source not in pypck.lcn_defs.Key
        ):
            return

        table_id = ord(self.source.name[0]) - 65
        key_id = int(self.source.name[1]) - 1

        self._value = input_obj.get_state(table_id, key_id)
        self.async_write_ha_state()


text:
# Usage Flow

## User-side

- A user logs into the service.
- He chooses a category to practice.
- He sees a sentence in Korean.
- He writes a sentence in English.
- He types enters, and a sentence which Admin has registered in advance will show up.
- He compares it with what he has written. He goes on.

## Admin-side

- An admin logs into the service.
- He chooses a category to register sentences.
- He types in a pair of English and Korean sentences, with its source URL, where he's found them.
- He can order the registered sentences in a different way.
- Basic principle is that easy ones come first.

# Basic Features

## Basic features - higher priority

- Logging in as a user group: user, admin
- Dashboard for user
- Dashboard for admin

## Optional features - lower priority

- Logging in with social accounts
  A user can log in with his/her social accounts such as Facebook, Twitter, or Gmail.
- Downloading the sets of sentences
- Viewing the whole sample of a certain category

# Target phrases

This is about phrases that learners are expected to learn. The phrases are categorized so that those that reflect the situations where Korean programmers write in English.

- Question and Answers
- Issues
- Commit message
- Comment
- Readme file
- Documentation on projects (description, tutorials, release notes)
- API manuals
- Specifications


text:
!
! Consecutive prime sum
!
! Problem 50
!
! The prime 41, can be written as the sum of six consecutive primes:
!
!   41 = 2 + 3 + 5 + 7 + 11 + 13
!
! This is the longest sum of consecutive primes that adds to a prime below
! one-hundred.
!
! The longest sum of consecutive primes below one-thousand that adds to a
! prime, contains 21 terms, and is equal to 953.
!
! Which prime, below one-million, can be written as the sum of the most
! consecutive primes?
!
program consecutive_prime_sum
    implicit none
    integer, parameter :: max_number = 1000000

    call solver

    contains

    subroutine sieve_of_eratosthenes(num, table)
        integer, intent(in) :: num
        logical, allocatable :: table(:)
        integer :: i, j

        allocate(table(num))
        table = .true.
        table(1) = .false.
        do i = 2, int(sqrt(real(num)))
            do j = i * 2, num, i
                table(j) = .false.
            end do
        end do
    end subroutine sieve_of_eratosthenes

    subroutine solver
        logical, allocatable :: prime_table(:)
        integer, allocatable :: prime_list(:)
        integer :: i, j, k, a, len, ii, max_prime

        allocate(prime_list(max_number))
        call sieve_of_eratosthenes(max_number, prime_table)
        k = 1
        prime_list(1) = 2
        do i = 3, max_number, 2
            if (prime_table(i)) then
                k = k + 1
                prime_list(k) = i
            end if
        end do

        len = 0
        do i = 1, k - 1
            a = 0
            do j = i, k
                a = a + prime_list(j)
                if (a > max_number) exit
                if (prime_table(a)) then
                    if (len < j - i + 1) then
                        len = j - i + 1
                        max_prime = a
                        !print '(i8": ["i3"] "*(i0:" "))', a, len, (prime_list(ii), ii = i, j)
                        print '(i8": ["i3"]")', a, len
                    end if
                end if
            end do
        end do
        print *, 'result =', max_prime

    end subroutine solver

end program consecutive_prime_sum


text:
package daemon

import (
	"time"

	"github.com/upfluence/uchiwa/uchiwa/logger"
	"github.com/upfluence/uchiwa/uchiwa/sensu"
	"github.com/upfluence/uchiwa/uchiwa/structs"
)

const datacenterErrorString = "Connection error. Is the Sensu API running?"

// Daemon structure is used to manage the Uchiwa daemon
type Daemon struct {
	Data        *structs.Data
	Datacenters *[]sensu.Sensu
}

// Start method fetches and builds Sensu data from each datacenter every Refresh seconds
func (d *Daemon) Start(interval int, data chan *structs.Data) {
	// immediately fetch the first set of data and send it over the data channel
	d.fetchData()
	d.buildData()

	select {
	case data <- d.Data:
		logger.Debug("Sending initial results on the 'data' channel")
	default:
		logger.Debug("Could not send initial results on the 'data' channel")
	}

	// fetch new data every interval
	duration := time.Duration(interval) * time.Second
	for _ = range time.Tick(duration) {
		d.resetData()
		d.fetchData()
		d.buildData()

		// send the result over the data channel
		select {
		case data <- d.Data:
			logger.Debug("Sending results on the 'data' channel")
		default:
			logger.Debug("Could not send results on the 'data' channel")
		}
	}
}

// buildData method prepares fetched data
func (d *Daemon) buildData() {
	d.buildEvents()
	d.buildClients()
	d.BuildSubscriptions()
	d.buildResults()
}

// getData retrieves all endpoints for every datacenter
func (d *Daemon) fetchData() {
	d.Data.Health.Sensu = make(map[string]structs.SensuHealth, len(*d.Datacenters))

	for _, datacenter := range *d.Datacenters {
		// set default health status
		d.Data.Health.Sensu[datacenter.Name] = structs.SensuHealth{Output: datacenterErrorString}
		d.Data.Health.Uchiwa = "ok"

		// fetch sensu data from the datacenter
		stashes, err := datacenter.GetStashes()
		if err != nil {
			logger.Warning(err)
			continue
		}
		checks, err := datacenter.GetChecks()
		if err != nil {
			logger.Warning(err)
			continue
		}
		clients, err := datacenter.GetClients()
		if err != nil {
			logger.Warning(err)
			continue
		}
		events, err := datacenter.GetEvents()
		if err != nil {
			logger.Warning(err)
			continue
		}
		info, err := datacenter.Info()
		if err != nil {
			logger.Warning(err)
			continue
		}
		aggregates, err := datacenter.GetAggregates()
		if err != nil {
			logger.Warning(err)
			continue
		}
		results, err := datacenter.Results()
		if err == nil {
			for _, v := range *results {
				setDc(v, datacenter.Name)
				d.Data.Results = append(d.Data.Results, v)
			}
		}

		d.Data.Health.Sensu[datacenter.Name] = structs.SensuHealth{Output: "ok"}

		// add fetched data into d.Data interface
		for _, v := range stashes {
			setDc(v, datacenter.Name)
			d.Data.Stashes = append(d.Data.Stashes, v)
		}
		for _, v := range checks {
			setDc(v, datacenter.Name)
			d.Data.Checks = append(d.Data.Checks, v)
		}
		for _, v := range clients {
			setDc(v, datacenter.Name)
			d.Data.Clients = append(d.Data.Clients, v)
		}
		for _, v := range events {
			setDc(v, datacenter.Name)
			d.Data.Events = append(d.Data.Events, v)
		}
		for _, v := range aggregates {
			setDc(v, datacenter.Name)
			d.Data.Aggregates = append(d.Data.Aggregates, v)
		}

		// build datacenter
		dc := d.buildDatacenter(&datacenter.Name, info)
		dc.Stats["aggregates"] = len(aggregates)
		dc.Stats["checks"] = len(checks)
		dc.Stats["clients"] = len(clients)
		dc.Stats["events"] = len(events)
		dc.Stats["stashes"] = len(stashes)
		d.Data.Dc = append(d.Data.Dc, dc)
	}
}

func (d *Daemon) resetData() {
	d.Data = &structs.Data{}
}


text:
package org.locationtech.geomesa.redis

import com.typesafe.scalalogging.LazyLogging
import org.locationtech.geomesa.index.geotools.GeoMesaDataStoreFactory.GeoMesaDataStoreParams
import org.locationtech.geomesa.security.SecurityParams
import org.locationtech.geomesa.utils.conf.GeoMesaSystemProperties.SystemProperty
import org.locationtech.geomesa.utils.geotools.GeoMesaParam
import redis.clients.jedis.JedisPool

import scala.util.control.NonFatal

package object data extends LazyLogging {

  // keep lazy to allow for runtime setting of the underlying sys prop
  lazy val TransactionBackoffs: IndexedSeq[Int] = try { backoffs(RedisSystemProperties.TransactionBackoff.get) } catch {
    case NonFatal(_) =>
      logger.error(s"Invalid backoff for property '${RedisSystemProperties.TransactionBackoff.property}', using defaults")
      backoffs(RedisSystemProperties.TransactionBackoff.default)
  }

  object RedisDataStoreParams extends GeoMesaDataStoreParams with SecurityParams {
    // disable loose bbox by default, since we don't have any z-iterators
    override protected def looseBBoxDefault = false

    val RedisUrlParam =
      new GeoMesaParam[String](
        "redis.url",
        "Redis connection URL. The URL can be used to specify the Redis database and credentials, if required - " +
            "for example, 'redis://user:password@localhost:6379/1'",
        optional = false,
        supportsNiFiExpressions = true)

    val RedisCatalogParam =
      new GeoMesaParam[String](
        "redis.catalog",
        "The name of the GeoMesa catalog table",
        optional = false,
        supportsNiFiExpressions = true)

    val PoolSizeParam =
      new GeoMesaParam[Integer](
        "redis.connection.pool.size",
        "Max number of simultaneous connections to use",
        default = 16,
        supportsNiFiExpressions = true)

    val TestConnectionParam =
      new GeoMesaParam[java.lang.Boolean](
        "redis.connection.pool.validate",
        "Test connections when borrowed from the pool. Connections may be closed due to inactivity, " +
            "which would cause a transient error if validation is disabled",
        default = Boolean.box(true))

    val PipelineParam =
      new GeoMesaParam[java.lang.Boolean](
        "redis.pipeline.enabled",
        "Enable pipelining of query requests. This reduces network latency, " +
            "but restricts queries to a single execution thread",
        default = Boolean.box(false))

    val ConnectionPoolParam = new GeoMesaParam[JedisPool]("redis.connection", "Connection pool") // generally used for testing
  }

  object RedisSystemProperties {
    val WriteBatchSize     = SystemProperty("geomesa.redis.write.batch", "1000")
    val TransactionRetries = SystemProperty("geomesa.redis.tx.retry", "10")
    val TransactionPause   = SystemProperty("geomesa.redis.tx.pause", "100ms")
    val TransactionBackoff = SystemProperty("geomesa.redis.tx.backoff", "1,1,2,2,5,10,20")
    val AgeOffInterval     = SystemProperty("geomesa.redis.age.off.interval", "10 minutes")
  }

  /**
    * Parse backoff property
    *
    * @param prop system property value
    * @return
    */
  private def backoffs(prop: String): IndexedSeq[Int] = {
    val seq = prop.split(",").map(_.toInt)
    require(seq.nonEmpty, "No backoff defined")
    seq
  }
}


text:
package org.apache.hadoop.contrib.failmon;

import java.net.InetAddress;
import java.util.Calendar;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**********************************************************
 * Objects of this class parse the output of the lm-sensors utility to gather
 * information about fan speed, temperatures for cpus and motherboard etc.
 *
 **********************************************************/

public class SensorsParser extends ShellParser {

	/**
	 * Reads and parses the output of the 'sensors' command and creates an
	 * appropriate EventRecord that holds the desirable information.
	 *
	 * @param s
	 *            unused parameter
	 *
	 * @return the EventRecord created
	 */
	public EventRecord query(String s) throws Exception {
		StringBuffer sb;

		// sb = Environment.runCommand("sensors -A");
		sb = Environment.runCommand("cat sensors.out");

		EventRecord retval = new EventRecord(InetAddress.getLocalHost()
				.getCanonicalHostName(), InetAddress.getAllByName(InetAddress
				.getLocalHost().getHostName()), Calendar.getInstance(),
				"lm-sensors", "Unknown", "sensors -A", "-");
		readGroup(retval, sb, "fan");
		readGroup(retval, sb, "in");
		readGroup(retval, sb, "temp");
		readGroup(retval, sb, "Core");

		return retval;
	}

	/**
	 * Reads and parses lines that provide the output of a group of sensors with
	 * the same functionality.
	 *
	 * @param er
	 *            the EventRecord to which the new attributes are added
	 * @param sb
	 *            the text to parse
	 * @param prefix
	 *            a String prefix specifying the common prefix of the sensors'
	 *            names in the group (e.g. "fan", "in", "temp"
	 *
	 * @return the EventRecord created
	 */
	private EventRecord readGroup(EventRecord er, StringBuffer sb, String prefix) {

		Pattern pattern = Pattern.compile(".*(" + prefix
				+ "\\s*\\d*)\\s*:\\s*(\\+?\\d+)", Pattern.MULTILINE);
		Matcher matcher = pattern.matcher(sb);

		while (matcher.find())
			er.set(matcher.group(1), matcher.group(2));

		return er;
	}

	/**
	 * Invokes query() to do the parsing and handles parsing errors.
	 *
	 * @return an array of EventRecords that holds one element that represents
	 *         the current state of the hardware sensors
	 */
	public EventRecord[] monitor() {
		EventRecord[] recs = new EventRecord[1];

		try {
			recs[0] = query(null);
		} catch (Exception e) {
			e.printStackTrace();
		}

		return recs;
	}

	/**
	 * Return a String with information about this class
	 *
	 * @return A String describing this class
	 */
	public String getInfo() {
		return ("lm-sensors parser");
	}

}


text:
package org.gradoop.flink.model.impl.operators.aggregation.functions.min;

/**
 * Superclass of aggregate functions that determine a minimal property value.
 */
public abstract class MinProperty extends Min {
  /**
   * Property key whose value should be aggregated.
   */
  protected final String propertyKey;

  /**
   * Constructor.
   *
   * @param propertyKey property key to aggregate
   */
  public MinProperty(String propertyKey) {
    this.propertyKey = propertyKey;
  }

  @Override
  public String getAggregatePropertyKey() {
    return "min_" + propertyKey;
  }
}


text:
namespace net {

// IP address family type used in QUIC. This hides platform dependant IP address
// family types.
enum class IpAddressFamily {
  IP_V4,
  IP_V6,
  IP_UNSPEC,
};

}  // namespace net

#endif  // NET_QUIC_PLATFORM_API_QUIC_IP_ADDRESS_FAMILY_H_