How nanawareatharva/codesentinel works
CodeSentinel’s implemented product is BugLens: it builds a defect-prediction model from labeled defect datasets, then analyzes a local Python repository to rank functions by risk and explain the highest-risk result. The README also describes AutoTestArmy and a feedback loop as future capabilities; their directories exist, but the sampled files do not implement them. Edges reflect sampled calls or explicit README statements; future-stage links are documented but not verified in source.
Main entry points: predict.py Risk Prediction · config.py Feature Schema · train.py Model Training · build_feature_matrix.py Feature Matrix
Components 16
Training Data
- Dataset Loader
buglens/mining/dataset_loader.py - Feature Matrix
scripts/build_feature_matrix.py - Model Training
buglens/model/train.py
BugLens Analysis
- Feature Schema
buglens/config.py - Model Artifacts
- Git History Mining
buglens/mining/git_miner.py - Function Metrics
buglens/mining/metric_extractor.py - Risk Prediction
buglens/model/predict.py - Ranked Risk Results
buglens/model/predict.py - SHAP Explanations
buglens/model/shap_explainer.py - Demo Runner
scripts/demo_buglens.py
Planned Capabilities
- Targeted Test Generation
autotestarmy - Feedback Loop
feedback
Other components
- NASA / PROMISE
- Developer
- Python Repository
Connections 21
- NASA / PROMISE → Dataset Loader: provides datasets
README.md - Dataset Loader → Feature Schema: uses schema
buglens/mining/dataset_loader.py - Feature Matrix → Dataset Loader: loads datasets
scripts/build_feature_matrix.py - Feature Matrix → Feature Schema: uses schema
scripts/build_feature_matrix.py - Feature Matrix → Model Training: training data
README.md - Model Training → Feature Schema: uses schema
buglens/model/train.py - Model Training → Model Artifacts: saves model
buglens/model/train.py - Developer → Demo Runner: runs analysis
README.md - Demo Runner → Risk Prediction: calls prediction
scripts/demo_buglens.py - Python Repository → Risk Prediction: analyzed by
buglens/model/predict.py - Risk Prediction → Git History Mining: mines history
buglens/model/predict.py - Risk Prediction → Function Metrics: extracts metrics
buglens/model/predict.py - Risk Prediction → Feature Schema: uses schema
buglens/model/predict.py - Risk Prediction → Model Artifacts: loads model
buglens/model/predict.py - Risk Prediction → Ranked Risk Results: ranks functions
buglens/model/predict.py - Demo Runner → SHAP Explanations: explains top risk
scripts/demo_buglens.py - SHAP Explanations → Feature Schema: uses schema
buglens/model/shap_explainer.py - SHAP Explanations → Model Artifacts: loads explainer
buglens/model/shap_explainer.py - Ranked Risk Results → Targeted Test Generation: prioritizes tests
README.md - Targeted Test Generation → Feedback Loop: test outcomes
README.md - Feedback Loop → Model Training: refines training
README.md