amazon-research / indoor-scene-generation-eai
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 419 units with 9,542 lines of code in units (0.2% of code).
    • 15 very long units (2,402 lines of code)
    • 29 long units (1,954 lines of code)
    • 83 medium size units (2,541 lines of code)
    • 104 small units (1,640 lines of code)
    • 188 very small units (1,005 lines of code)
25% | 20% | 26% | 17% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py36% | 9% | 22% | 23% | 7%
cs18% | 27% | 29% | 13% | 12%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
IndoorSceneSynthesis/ConstraintStochasticIndoorSceneGeneration/Custom16% | 29% | 30% | 12% | 10%
Luminous4Alfred/TaskParser/cdf_gene77% | 0% | 17% | 4% | <1%
EAIEvaluation/HiTUT/hitut_train50% | 14% | 15% | 15% | 3%
Luminous4Alfred/TaskSolver/Algorithms23% | 17% | 21% | 18% | 18%
EAIEvaluation/ET/et_train15% | 5% | 31% | 36% | 11%
EAIEvaluation/MOCA/moca_train66% | 0% | 0% | 28% | 4%
IndoorSceneSynthesis/LearningBasedModels/DeepSynth0% | 40% | 15% | 20% | 23%
Luminous4Alfred/NaturalLanguageTools/et_train0% | 8% | 39% | 39% | 12%
EAIEvaluation/ET0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def get_task_goals_and_script()
in Luminous4Alfred/TaskParser/cdf_gene/utils.py
254 6 1
def generate_cdf_from_task_by_gt()
in Luminous4Alfred/TaskParser/cdf_gene/utils.py
253 92 3
public void ParseTaskJson()
in IndoorSceneSynthesis/ConstraintStochasticIndoorSceneGeneration/Custom/CustomScripts/Algorithms/AlfredAgent.cs
247 28 1
public void ParseTaskJson()
in Luminous4Alfred/TaskSolver/Algorithms/AlfredAgent.cs
246 28 1
def prepare_data_instances()
in EAIEvaluation/HiTUT/hitut_train/custom_dataset.py
168 37 1
def get_goal_conditions_meet()
in EAIEvaluation/MOCA/moca_train/custom_eval.py
146 121 4
def get_goal_conditions_meet()
in EAIEvaluation/ET/et_train/custom_eval.py
146 121 4
def get_goal_conditions_meet()
in EAIEvaluation/HiTUT/hitut_train/custom_eval.py
146 121 4
public override void OnInspectorGUI()
in IndoorSceneSynthesis/ConstraintStochasticIndoorSceneGeneration/Custom/CustomEditor/CSceneCopier.cs
125 29 0
def generate_cdf_from_task()
in Luminous4Alfred/TaskParser/cdf_gene/utils.py
123 31 2
def process_actions()
in EAIEvaluation/HiTUT/hitut_train/custom_dataset.py
118 50 3
public bool CustomPlaceObj()
in IndoorSceneSynthesis/ConstraintStochasticIndoorSceneGeneration/Custom/CustomScripts/CObjectPlacerTool.cs
113 18 5
public override void OnInspectorGUI()
in IndoorSceneSynthesis/ConstraintStochasticIndoorSceneGeneration/Custom/CustomEditor/CSceneBuilder.cs
106 18 0
public IEnumerator SetUpNewSceneFromSelf()
in IndoorSceneSynthesis/ConstraintStochasticIndoorSceneGeneration/Custom/CustomScripts/CSceneBuilderTool.cs
106 18 3
public void CopyStructure2NewScene()
in IndoorSceneSynthesis/ConstraintStochasticIndoorSceneGeneration/Custom/CustomEditor/CSceneCopier.cs
105 70 0
public void GoToLocation()
in Luminous4Alfred/TaskSolver/Algorithms/AlfredAgent.cs
99 24 4
public void GoToLocation()
in IndoorSceneSynthesis/ConstraintStochasticIndoorSceneGeneration/Custom/CustomScripts/Algorithms/AlfredAgent.cs
99 24 4
public void LoadObjectPrefab()
in IndoorSceneSynthesis/ConstraintStochasticIndoorSceneGeneration/Custom/Visualization/CSunCGVisualizer.cs
89 11 2
public void GenerateTrainingForOneTaskInCurrentScene()
in Luminous4Alfred/TaskSolver/Algorithms/AlfredTaskHelperTool.cs
83 15 0
public bool CustomPlaceObject()
in IndoorSceneSynthesis/ConstraintStochasticIndoorSceneGeneration/Custom/CustomScripts/CObjectPlacerTool.cs
83 17 0