Source:
<code>public Concept getConceptEntity(String rawConceptName, boolean isCoded, boolean createConceptIfNotAvailableLocally) throws ConceptController.ConceptFetchException, ConceptController.ConceptParseException{ <START> String conceptId = getConceptId(rawConceptName); <END> if(StringUtils.isEmpty(conceptId)){ throw new ConceptController.ConceptParseException("Could not not get Concept identifier for concept with raw name '" + rawConceptName + "'"); } Concept observedConcept; boolean isConceptIdNumeric = org.apache.commons.lang.StringUtils.isNumeric(conceptId); if(isConceptIdNumeric) { int intConceptId = Integer.parseInt(conceptId); observedConcept =conceptController.getConceptById(intConceptId); } else { observedConcept = conceptController.getConceptByUuid(conceptId); } if (observedConcept == null && createConceptIfNotAvailableLocally == true) { String conceptName = getConceptId(rawConceptName); if(StringUtils.isEmpty(conceptName)){ throw new ConceptController.ConceptParseException("Could not not get Concept identifier for concept with raw name '" + rawConceptName + "'"); } Concept conceptFromExistingList = getConceptFromExistingList(conceptName); if (conceptFromExistingList != null) { return conceptFromExistingList; } if(!isConceptIdNumeric){ observedConcept = buildDummyConcept(0,conceptId, conceptName, isCoded); } else { int intConceptId = Integer.parseInt(conceptId); if (intConceptId > 0) { observedConcept = buildDummyConcept(intConceptId,null, conceptName, isCoded); } else { observedConcept = buildDummyConcept(conceptName, isCoded); } } newConceptList.add(observedConcept); } return observedConcept; }</code><technical_language>Consider renaming conceptId conceptIdOrUuid method name</technical_language>

Target:
public Concept getConceptEntity(String rawConceptName, boolean isCoded, boolean createConceptIfNotAvailableLocally) throws ConceptController.ConceptFetchException, ConceptController.ConceptParseException{ String conceptIdOrUuid = getConceptId(rawConceptName); if(StringUtils.isEmpty(conceptIdOrUuid)){ throw new ConceptController.ConceptParseException("Could not not get Concept identifier for concept with raw name '" + rawConceptName + "'"); } Concept observedConcept; boolean isConceptIdNumeric = org.apache.commons.lang.StringUtils.isNumeric(conceptIdOrUuid); if(isConceptIdNumeric) { int intConceptId = Integer.parseInt(conceptIdOrUuid); observedConcept =conceptController.getConceptById(intConceptId); } else { observedConcept = conceptController.getConceptByUuid(conceptIdOrUuid); } if (observedConcept == null && createConceptIfNotAvailableLocally == true) { String conceptName = getConceptId(rawConceptName); if(StringUtils.isEmpty(conceptName)){ throw new ConceptController.ConceptParseException("Could not not get Concept identifier for concept with raw name '" + rawConceptName + "'"); } Concept conceptFromExistingList = getConceptFromExistingList(conceptName); if (conceptFromExistingList != null) { return conceptFromExistingList; } if(!isConceptIdNumeric){ observedConcept = buildDummyConcept(0,conceptIdOrUuid, conceptName, isCoded); } else { int intConceptId = Integer.parseInt(conceptIdOrUuid); if (intConceptId > 0) { observedConcept = buildDummyConcept(intConceptId,null, conceptName, isCoded); } else { observedConcept = buildDummyConcept(conceptName, isCoded); } } newConceptList.add(observedConcept); } return observedConcept; }