Showing 56 of 131 total issues
Method CreateNewStudy
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public int CreateNewStudy(StudyDirection[] studyDirections, string studyName)
{
long maxLength;
using (var connection = new SQLiteConnection(_sqliteConnection.ToString()))
{
Method SetUIValues
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void SetUIValues()
{
TLog.MethodStart();
TLog.Info("Set UI values");
HumanInTheLoopType type = _component.GhInOut.Objectives.HumanInTheLoopType;
Method CreateFigure
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private Visualization CreateFigure(dynamic study, Plot pSettings)
{
TLog.MethodStart();
var visualize = new Visualization(study);
switch (pSettings.PlotTypeName)
Method ToPython
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public dynamic ToPython(SamplerType type, string storagePath, bool hasConstraints, Dictionary<string, double> firstVariables)
{
TLog.MethodStart();
dynamic optunaSampler;
dynamic optuna = Py.Import("optuna");
Method Run
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
internal static void Run(object sender, DoWorkEventArgs e)
{
TLog.MethodStart();
s_worker = sender as BackgroundWorker;
Component = e.Argument as UIOptimizeComponentBase;
Method GetAllStudySummaries
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static StudySummary[] GetAllStudySummaries(IOptunaStorage storage)
{
Study[] studies = storage.GetAllStudies();
var studySummaries = new StudySummary[studies.Length];
for (int i = 0; i < studies.Length; i++)
Method GetAttrs
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static void GetAttrs(Dictionary<string, object> attrs, SQLiteDataReader reader)
{
string key = reader.GetString(0);
string value = reader.GetString(1);
if (!string.IsNullOrEmpty(value) && value.Contains("[") && value.Contains("]"))
Method SetSliderValues
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void SetSliderValues(decimal[] parameters)
{
TLog.MethodStart();
int i = 0;
Method ShowUIEndMessages
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static DialogResult ShowUIEndMessages(EndState endState, bool isMultiObjective)
{
TLog.MethodStart();
DialogResult dialogResult;
MessageBoxButtons button = isMultiObjective ? MessageBoxButtons.OK : MessageBoxButtons.YesNo;
Method SelectItemUnsafe
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public void SelectItemUnsafe(int index)
{
if (index < 0 || index >= ListItems.Count)
{
return;
Method ToComponentEndMessage
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static void ToComponentEndMessage(Algorithm optimize)
{
TLog.MethodStart();
string message;
switch (optimize.EndState)
Method ToPython
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public dynamic ToPython(dynamic optuna, string storagePath, Dictionary<string, double> firstVariables)
{
Dictionary<string, double> x0 = UseFirstEggToX0 && firstVariables != null && firstVariables.Count > 0
? firstVariables
: null;
Method GetAllStudies
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public Study.Study[] GetAllStudies()
{
using (var connection = new SQLiteConnection(_sqliteConnection.ToString()))
{
connection.Open();
Method SetOutputIndices
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private bool SetOutputIndices(OutputMode mode)
{
TLog.MethodStart();
bool result = true;
var indices = new List<int>();
Method SetArtifacts
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private bool SetArtifacts()
{
TLog.MethodStart();
Artifacts = new Artifact();
if (_component.Params.Input[3].SourceCount == 0)
Method AddVariablesToFishEgg
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void AddVariablesToFishEgg(IEnumerable<VariableBase> variables)
{
foreach (VariableBase variable in variables)
{
string name = variable.NickName;
Method ToString
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public override string ToString()
{
var sb = new StringBuilder();
foreach (KeyValuePair<string, object> attr in Value)
{
Method GetParetoFrontTrials2D
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Trial.Trial[] GetParetoFrontTrials2D(List<Trial.Trial> trials, StudyDirection[] directions)
{
List<Trial.Trial> targetTrials = trials.FindAll(trial => trial.State == TrialState.COMPLETE);
int nTrials = targetTrials.Count;
Method CheckOptimizeComplete
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private bool CheckOptimizeComplete(OptimizationHandlingInfo optInfo, int trialNum, DateTime startTime)
{
TLog.MethodStart();
int nTrials = optInfo.NTrials;
Method SetAttributeEachItem
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void SetAttributeEachItem(StringBuilder sb, KeyValuePair<string, object> attr)
{
var valueStrings = new StringBuilder();
if (attr.Key == "Geometry")
{