nus-yam/ex-repair huggingface dataset:
Program: 85729
Project: 85729
Buggy source:
private String[] getJavaStringArray(JSONArray array) throws JSONException {
  int len=array.length();
  String[] result=new String[len];
  for (int i=0; i < len; i++) {
    result[i]=array.getString(i);
  }
  return result;
}

Fixed version (ground truth):
private String[] getJavaStringArray(JSONArray array) throws JSONException {
  int len=array.length();
  String[] result=new String[len];
  for (int i=0; i < len; i++) {
    result[i]=array.isNull(i) ? null : array.getString(i);
  }
  return result;
}
Program: 85730
Project: 85730
Buggy source:
/** 
 * Escapes the given string for JSON.
 */
private static String escapeString(String value){
  return Util.escapeString(value);
}

Fixed version (ground truth):
/** 
 * Escapes the given string for JSON.
 */
private static String escapeString(String value){
  return SourceMapUtil.escapeString(value);
}
Program: 85731
Project: 85731
Buggy source:
private String expectedCss(){
  try {
    return IOUtils.toString(new FileReader(cssOutput));
  }
 catch (  Throwable ex) {
    throw new RuntimeException(ex.getMessage(),ex);
  }
}

Fixed version (ground truth):
protected String expectedCss(){
  return readFile(cssOutput);
}
Program: 85732
Project: 85732
Buggy source:
@Test public final void compileAndCompare(){
  try {
    CompilationResult actual=compile(lessFile,cssOutput);
    assertCorrectCssAnsWarnings(actual);
    assertSourceMapValid(actual);
  }
 catch (  Less4jException ex) {
    printErrors(ex);
    assertCorrectErrors(ex);
  }
catch (  Throwable ex) {
    if (ex instanceof ComparisonFailure) {
      ComparisonFailure fail=(ComparisonFailure)ex;
      throw fail;
    }
    if (ex instanceof AssertionError) {
      AssertionError fail=(AssertionError)ex;
      throw fail;
    }
    throw new RuntimeException(ex.getMessage(),ex);
  }
}

Fixed version (ground truth):
@Test public void compileAndCompare(){
  try {
    CompilationResult actual=compile(lessFile,cssOutput);
    assertCorrectCssAndWarnings(actual);
    assertSourceMapValid(actual);
  }
 catch (  Less4jException ex) {
    printErrors(ex);
    assertCorrectErrors(ex);
  }
}
Program: 85733
Project: 85733
Buggy source:
@Override protected CompilationResult compile(File lessFile,File cssOutput) throws Less4jException {
  CompilationResult result=supercompile(lessFile,cssOutput);
  if (printTo != null) {
    try {
      FileUtils.writeStringToFile(new File(printTo),result.getCss());
    }
 catch (    IOException e) {
      throw new RuntimeException(e);
    }
  }
  System.out.println("String_Node_Str");
  System.out.println(result.getCss());
  return result;
}

Fixed version (ground truth):
@Override protected CompilationResult compile(File lessFile,File cssOutput) throws Less4jException {
  CompilationResult result=super.compile(lessFile,cssOutput);
  if (printTo != null) {
    try {
      FileUtils.writeStringToFile(new File(printTo),result.getCss());
    }
 catch (    IOException e) {
      throw new RuntimeException(e);
    }
  }
  System.out.println("String_Node_Str");
  System.out.println(result.getCss());
  return result;
}
Program: 85734
Project: 85734
Buggy source:
@Override public String toScript(Expression value,LessProblems problemsHandler){
  InStringCssPrinter builder=new InStringCssPrinter();
  builder.append(value);
  String replacement=builder.toString();
  return replacement;
}

Fixed version (ground truth):
@Override public String toScript(Expression value,LessProblems problemsHandler){
  InStringCssPrinter builder=new InStringCssPrinter();
  builder.append(value);
  if (!builder.getUnprintableNodes().isEmpty())   return null;
  String replacement=builder.toString();
  return replacement;
}
Program: 85735
Project: 85735
Buggy source:
private String format(String value,List<Expression> parameters,HiddenTokenAwareTree technicalUnderlying){
  StringFormatter formatter=new StringFormatter();
  return formatter.replaceIn(value,parameters.iterator(),technicalUnderlying);
}

Fixed version (ground truth):
private String format(String value,List<Expression> parameters,ProblemsHandler problemsHandler,HiddenTokenAwareTree technicalUnderlying){
  StringFormatter formatter=new StringFormatter(problemsHandler);
  return formatter.replaceIn(value,parameters.iterator(),technicalUnderlying);
}
Program: 85736
Project: 85736
Buggy source:
private Expression evaluate(CssString format,List<Expression> parameters,HiddenTokenAwareTree technicalUnderlying){
  String newValue=format(format.getValue(),parameters,technicalUnderlying);
  return new CssString(format.getUnderlyingStructure(),newValue,"String_Node_Str");
}

Fixed version (ground truth):
private Expression evaluate(CssString format,List<Expression> parameters,ProblemsHandler problemsHandler,HiddenTokenAwareTree technicalUnderlying){
  String newValue=format(format.getValue(),parameters,problemsHandler,technicalUnderlying);
  return new CssString(format.getUnderlyingStructure(),newValue,"String_Node_Str");
}
Program: 85737
Project: 85737
Buggy source:
@Override protected String replacementValue(IScopeAwareExpressionsEvaluator expressionEvaluator,HiddenTokenAwareTree technicalUnderlying,MatchRange matchRange){
  Expression value=expressionEvaluator.evaluateIfPresent(new Variable(technicalUnderlying,matchRange.getName()));
  if (value == null) {
    return matchRange.getFullMatch();
  }
  return embeddedScriptEvaluator.toScript(value,problemsHandler);
}

Fixed version (ground truth):
@Override protected String replacementValue(IScopeAwareExpressionsEvaluator expressionEvaluator,HiddenTokenAwareTree technicalUnderlying,MatchRange matchRange){
  Expression value=expressionEvaluator.evaluateIfPresent(new Variable(technicalUnderlying,matchRange.getName()));
  if (value == null) {
    return matchRange.getFullMatch();
  }
  String result=embeddedScriptEvaluator.toScript(value,problemsHandler);
  if (result == null) {
    problemsHandler.stringInterpolationNotSupported(technicalUnderlying,value);
    result=CssPrinter.ERROR;
  }
  return result;
}
Program: 85738
Project: 85738
Buggy source:
@Override public void addError(ASTCssNode errorNode,String description){
  collector.addError(new CompilationError(errorNode,description));
}

Fixed version (ground truth):
public void addError(HiddenTokenAwareTree errorNode,String description){
  collector.addError(new CompilationError(new FaultyExpression(errorNode),description));
}
Program: 85740
Project: 85740
Buggy source:
private void evaluateExpressions(ASTCssNode node){
  ASTManipulator manipulator=new ASTManipulator();
  IScopeAwareExpressionsEvaluator expressionEvaluator=new IScopeAwareExpressionsEvaluator(problemsHandler,configuration);
  if (node instanceof Expression) {
    Expression value=expressionEvaluator.evaluate((Expression)node);
    manipulator.replace(node,value);
  }
 else {
    List<? extends ASTCssNode> childs=node.getChilds();
    for (    ASTCssNode kid : childs) {
switch (kid.getType()) {
case FIXED_MEDIA_EXPRESSION:
        evaluateInMediaExpressions((FixedMediaExpression)kid);
      break;
case DECLARATION:
    evaluateInDeclaration((Declaration)kid);
  break;
default :
evaluateExpressions(kid);
break;
}
}
}
}

Fixed version (ground truth):
private void evaluateExpressions(ASTCssNode node){
  ASTManipulator manipulator=new ASTManipulator();
  ExpressionsEvaluator expressionEvaluator=new ExpressionsEvaluator(problemsHandler,configuration);
  if (node instanceof Expression) {
    Expression value=expressionEvaluator.evaluate((Expression)node);
    manipulator.replace(node,value);
  }
 else {
    List<? extends ASTCssNode> childs=node.getChilds();
    for (    ASTCssNode kid : childs) {
switch (kid.getType()) {
case FIXED_MEDIA_EXPRESSION:
        evaluateInMediaExpressions((FixedMediaExpression)kid);
      break;
case DECLARATION:
    evaluateInDeclaration((Declaration)kid);
  break;
default :
evaluateExpressions(kid);
break;
}
}
}
}
Program: 85741
Project: 85741
Buggy source:
public String extractFilename(Expression urlInput,ProblemsHandler problemsHandler,Configuration configuration){
  IScopeAwareExpressionsEvaluator expressionEvaluator=new IScopeAwareExpressionsEvaluator(problemsHandler,configuration);
  Expression urlExpression=expressionEvaluator.evaluate(urlInput);
  if (urlExpression.getType() != ASTCssNodeType.FUNCTION)   return toJavaFileSeparator(contentToString(urlExpression));
  FunctionExpression function=(FunctionExpression)urlExpression;
  if (!"String_Node_Str".equals(function.getName().toLowerCase()))   return null;
  return toJavaFileSeparator(contentToString(expressionEvaluator.evaluate(function.getParameter())));
}

Fixed version (ground truth):
public String extractFilename(Expression urlInput,ProblemsHandler problemsHandler,Configuration configuration){
  ExpressionsEvaluator expressionEvaluator=new ExpressionsEvaluator(problemsHandler,configuration);
  Expression urlExpression=expressionEvaluator.evaluate(urlInput);
  if (urlExpression.getType() != ASTCssNodeType.FUNCTION)   return toJavaFileSeparator(contentToString(urlExpression));
  FunctionExpression function=(FunctionExpression)urlExpression;
  if (!"String_Node_Str".equals(function.getName().toLowerCase()))   return null;
  return toJavaFileSeparator(contentToString(expressionEvaluator.evaluate(function.getParameter())));
}
Program: 85742
Project: 85742
Buggy source:
@Override protected String replacementValue(IScopeAwareExpressionsEvaluator expressionEvaluator,HiddenTokenAwareTree technicalUnderlying,MatchRange matchRange){
  Expression value=expressionEvaluator.evaluateIfPresent(new Variable(technicalUnderlying,matchRange.getName()));
  if (value == null) {
    return matchRange.getFullMatch();
  }
  String result=embeddedScriptEvaluator.toScript(value,problemsHandler);
  if (result == null) {
    problemsHandler.stringInterpolationNotSupported(technicalUnderlying,value);
    result=CssPrinter.ERROR;
  }
  return result;
}

Fixed version (ground truth):
@Override protected String replacementValue(ExpressionsEvaluator expressionEvaluator,HiddenTokenAwareTree technicalUnderlying,MatchRange matchRange){
  Expression value=expressionEvaluator.evaluateIfPresent(new Variable(technicalUnderlying,matchRange.getName()));
  if (value == null) {
    return matchRange.getFullMatch();
  }
  String result=embeddedScriptEvaluator.toScript(value,problemsHandler);
  if (result == null) {
    problemsHandler.stringInterpolationNotSupported(technicalUnderlying,value);
    result=CssPrinter.ERROR;
  }
  return result;
}
Program: 85743
Project: 85743
Buggy source:
public ArgumentsBuilder(MixinReference reference,ReusableStructure pureMixin,IScopeAwareExpressionsEvaluator referenceEvaluator,ProblemsHandler problemsHandler){
  super();
  this.referenceEvaluator=referenceEvaluator;
  this.problemsHandler=problemsHandler;
  this.positionalParameters=reference.getPositionalParameters().iterator();
  this.reference=reference;
  argumentsScope=ScopeFactory.createDummyScope(reference,"String_Node_Str" + reference + "String_Node_Str");
  mixin=pureMixin;
}

Fixed version (ground truth):
public ArgumentsBuilder(MixinReference reference,ReusableStructure pureMixin,ExpressionsEvaluator referenceEvaluator,ProblemsHandler problemsHandler){
  super();
  this.referenceEvaluator=referenceEvaluator;
  this.problemsHandler=problemsHandler;
  this.positionalParameters=reference.getPositionalParameters().iterator();
  this.reference=reference;
  argumentsScope=ScopeFactory.createDummyScope(reference,"String_Node_Str" + reference + "String_Node_Str");
  mixin=pureMixin;
}
Program: 85744
Project: 85744
Buggy source:
public MixinsReferenceMatcher(IScope scope,ProblemsHandler problemsHandler,Configuration configuration){
  evaluator=new IScopeAwareExpressionsEvaluator(scope,problemsHandler,configuration);
}

Fixed version (ground truth):
public MixinsReferenceMatcher(IScope scope,ProblemsHandler problemsHandler,Configuration configuration){
  evaluator=new ExpressionsEvaluator(scope,problemsHandler,configuration);
}
Program: 85745
Project: 85745
Buggy source:
public ImportedScopeFilter(IScopeAwareExpressionsEvaluator expressionEvaluator,IScope importTargetScope){
  super();
  this.expressionEvaluator=expressionEvaluator;
  this.importTargetScope=importTargetScope;
}

Fixed version (ground truth):
public ImportedScopeFilter(ExpressionsEvaluator expressionEvaluator,IScope importTargetScope){
  super();
  this.expressionEvaluator=expressionEvaluator;
  this.importTargetScope=importTargetScope;
}
Program: 85746
Project: 85746
Buggy source:
private BodyCompilationResult resolveReferencedBody(final IScope callerScope,final BodyOwner<?> mixin,final IScope mixinWorkingScope){
  final IScopeAwareExpressionsEvaluator expressionEvaluator=new IScopeAwareExpressionsEvaluator(mixinWorkingScope,problemsHandler,configuration);
  final IScope referencedMixinScope=mixinWorkingScope;
  return InScopeSnapshotRunner.runInOriginalDataSnapshot(referencedMixinScope,new IFunction<BodyCompilationResult>(){
    @Override public BodyCompilationResult run(){
      List<ASTCssNode> replacement=compileBody(mixin.getBody(),referencedMixinScope);
      IScope returnValues=ScopeFactory.createDummyScope();
      returnValues.addFilteredVariables(new ImportedScopeFilter(expressionEvaluator,callerScope),referencedMixinScope);
      List<FullMixinDefinition> unmodifiedMixinsToImport=referencedMixinScope.getAllMixins();
      List<FullMixinDefinition> allMixinsToImport=mixinsToImport(callerScope,referencedMixinScope,unmodifiedMixinsToImport);
      returnValues.addAllMixins(allMixinsToImport);
      return new BodyCompilationResult((ASTCssNode)mixin,replacement,returnValues);
    }
  }
);
}

Fixed version (ground truth):
private BodyCompilationResult resolveReferencedBody(final IScope callerScope,final BodyOwner<?> mixin,final IScope mixinWorkingScope){
  final ExpressionsEvaluator expressionEvaluator=new ExpressionsEvaluator(mixinWorkingScope,problemsHandler,configuration);
  final IScope referencedMixinScope=mixinWorkingScope;
  return InScopeSnapshotRunner.runInOriginalDataSnapshot(referencedMixinScope,new IFunction<BodyCompilationResult>(){
    @Override public BodyCompilationResult run(){
      List<ASTCssNode> replacement=compileBody(mixin.getBody(),referencedMixinScope);
      IScope returnValues=ScopeFactory.createDummyScope();
      returnValues.addFilteredVariables(new ImportedScopeFilter(expressionEvaluator,callerScope),referencedMixinScope);
      List<FullMixinDefinition> unmodifiedMixinsToImport=referencedMixinScope.getAllMixins();
      List<FullMixinDefinition> allMixinsToImport=mixinsToImport(callerScope,referencedMixinScope,unmodifiedMixinsToImport);
      returnValues.addAllMixins(allMixinsToImport);
      return new BodyCompilationResult((ASTCssNode)mixin,replacement,returnValues);
    }
  }
);
}
Program: 85747
Project: 85747
Buggy source:
@Deprecated private BodyCompilationResult resolveMixinReference(final IScope callerScope,final FullMixinDefinition referencedMixin,final IScope mixinWorkingScope){
  final IScopeAwareExpressionsEvaluator expressionEvaluator=new IScopeAwareExpressionsEvaluator(mixinWorkingScope,problemsHandler,configuration);
  final ReusableStructure mixin=referencedMixin.getMixin();
  final IScope referencedMixinScope=mixinWorkingScope;
  return InScopeSnapshotRunner.runInOriginalDataSnapshot(referencedMixinScope,new IFunction<BodyCompilationResult>(){
    @Override public BodyCompilationResult run(){
      List<ASTCssNode> replacement=compileBody(mixin.getBody(),referencedMixinScope);
      IScope returnValues=expressionEvaluator.evaluateValues(referencedMixinScope);
      List<FullMixinDefinition> unmodifiedMixinsToImport=referencedMixinScope.getAllMixins();
      List<FullMixinDefinition> allMixinsToImport=mixinsToImport(callerScope,referencedMixinScope,unmodifiedMixinsToImport);
      returnValues.addAllMixins(allMixinsToImport);
      return new BodyCompilationResult(mixin,replacement,returnValues);
    }
  }
);
}

Fixed version (ground truth):
@Deprecated private BodyCompilationResult resolveMixinReference(final IScope callerScope,final FullMixinDefinition referencedMixin,final IScope mixinWorkingScope){
  final ExpressionsEvaluator expressionEvaluator=new ExpressionsEvaluator(mixinWorkingScope,problemsHandler,configuration);
  final ReusableStructure mixin=referencedMixin.getMixin();
  final IScope referencedMixinScope=mixinWorkingScope;
  return InScopeSnapshotRunner.runInOriginalDataSnapshot(referencedMixinScope,new IFunction<BodyCompilationResult>(){
    @Override public BodyCompilationResult run(){
      List<ASTCssNode> replacement=compileBody(mixin.getBody(),referencedMixinScope);
      IScope returnValues=expressionEvaluator.evaluateValues(referencedMixinScope);
      List<FullMixinDefinition> unmodifiedMixinsToImport=referencedMixinScope.getAllMixins();
      List<FullMixinDefinition> allMixinsToImport=mixinsToImport(callerScope,referencedMixinScope,unmodifiedMixinsToImport);
      returnValues.addAllMixins(allMixinsToImport);
      return new BodyCompilationResult(mixin,replacement,returnValues);
    }
  }
);
}
Program: 85748
Project: 85748
Buggy source:
private IScope buildMixinsArguments(MixinReference reference,IScope referenceScope,FullMixinDefinition mixin){
  ArgumentsBuilder builder=new ArgumentsBuilder(reference,mixin.getMixin(),new IScopeAwareExpressionsEvaluator(referenceScope,problemsHandler,configuration),problemsHandler);
  return builder.build();
}

Fixed version (ground truth):
private IScope buildMixinsArguments(MixinReference reference,IScope referenceScope,FullMixinDefinition mixin){
  ArgumentsBuilder builder=new ArgumentsBuilder(reference,mixin.getMixin(),new ExpressionsEvaluator(referenceScope,problemsHandler,configuration),problemsHandler);
  return builder.build();
}
Program: 85751
Project: 85751
Buggy source:
private FixedNamePart interpolateFixedNamePart(FixedNamePart input,IScopeAwareExpressionsEvaluator expressionEvaluator){
  String value=stringInterpolator.replaceIn(input.getName(),expressionEvaluator,input.getUnderlyingStructure());
  return new FixedNamePart(input.getUnderlyingStructure(),value);
}

Fixed version (ground truth):
private FixedNamePart interpolateFixedNamePart(FixedNamePart input,ExpressionsEvaluator expressionEvaluator){
  String value=stringInterpolator.replaceIn(input.getName(),expressionEvaluator,input.getUnderlyingStructure());
  return new FixedNamePart(input.getUnderlyingStructure(),value);
}
Program: 85752
Project: 85752
Buggy source:
private void solveNonCalligReferences(List<ASTCssNode> childs,IteratedScope iteratedScope){
  IScopeAwareExpressionsEvaluator cssGuardsValidator=new IScopeAwareExpressionsEvaluator(iteratedScope.getScope(),problemsHandler,configuration);
  for (  ASTCssNode kid : childs) {
    if (isMixinReference(kid) || isDetachedRulesetReference(kid))     continue;
    if (isRuleset(kid)) {
      RuleSet ruleSet=(RuleSet)kid;
      if (cssGuardsValidator.guardsSatisfied(ruleSet)) {
        ruleSet.removeGuards();
      }
 else {
        manipulator.removeFromClosestBody(ruleSet);
        iteratedScope.getNextChild();
        continue;
      }
    }
    if (AstLogic.isQuotelessUrlFunction(kid)) {
      continue;
    }
    if (AstLogic.hasOwnScope(kid)) {
      IteratedScope scope=iteratedScope.getNextChild();
      doSolveReferences(kid,scope);
    }
 else {
      boolean finishedNode=solveIfVariableReference(kid,iteratedScope.getScope());
      if (!finishedNode)       unsafeDoSolveReferences(kid,iteratedScope);
    }
  }
}

Fixed version (ground truth):
private void solveNonCalligReferences(List<ASTCssNode> childs,IteratedScope iteratedScope){
  ExpressionsEvaluator cssGuardsValidator=new ExpressionsEvaluator(iteratedScope.getScope(),problemsHandler,configuration);
  for (  ASTCssNode kid : childs) {
    if (isMixinReference(kid) || isDetachedRulesetReference(kid))     continue;
    if (isRuleset(kid)) {
      RuleSet ruleSet=(RuleSet)kid;
      if (cssGuardsValidator.guardsSatisfied(ruleSet)) {
        ruleSet.removeGuards();
      }
 else {
        manipulator.removeFromClosestBody(ruleSet);
        iteratedScope.getNextChild();
        continue;
      }
    }
    if (AstLogic.isQuotelessUrlFunction(kid)) {
      continue;
    }
    if (AstLogic.hasOwnScope(kid)) {
      IteratedScope scope=iteratedScope.getNextChild();
      doSolveReferences(kid,scope);
    }
 else {
      boolean finishedNode=solveIfVariableReference(kid,iteratedScope.getScope());
      if (!finishedNode)       unsafeDoSolveReferences(kid,iteratedScope);
    }
  }
}
Program: 85753
Project: 85753
Buggy source:
private SimpleSelector interpolateEscapedSelector(EscapedSelector input,IScopeAwareExpressionsEvaluator expressionEvaluator){
  HiddenTokenAwareTree underlying=input.getUnderlyingStructure();
  String value=stringInterpolator.replaceIn(input.getValue(),expressionEvaluator,input.getUnderlyingStructure());
  InterpolableName interpolableName=new InterpolableName(underlying,new FixedNamePart(underlying,value));
  return new SimpleSelector(input.getUnderlyingStructure(),input.getLeadingCombinator(),interpolableName,false);
}

Fixed version (ground truth):
private SimpleSelector interpolateEscapedSelector(EscapedSelector input,ExpressionsEvaluator expressionEvaluator){
  HiddenTokenAwareTree underlying=input.getUnderlyingStructure();
  String value=stringInterpolator.replaceIn(input.getValue(),expressionEvaluator,input.getUnderlyingStructure());
  InterpolableName interpolableName=new InterpolableName(underlying,new FixedNamePart(underlying,value));
  return new SimpleSelector(input.getUnderlyingStructure(),input.getLeadingCombinator(),interpolableName,false);
}
Program: 85754
Project: 85754
Buggy source:
private void resolveImportsAndReferences(StyleSheet less,LessSource source){
  ExperimentalImportsSolver importsSolver=new ExperimentalImportsSolver(problemsHandler);
  InitialScopeExtractor scopeBuilder=new InitialScopeExtractor();
  IScope scope=scopeBuilder.extractScope(less);
  List<PlaceholderScope> importsPlaceholders=scopeBuilder.getImportsPlaceholders();
  solveNestedImports(source,importsSolver,importsPlaceholders);
  ReferencesSolver referencesSolver=new ReferencesSolver(problemsHandler);
  referencesSolver.solveReferences(less,scope);
}

Fixed version (ground truth):
private void resolveImportsAndReferences(StyleSheet less,LessSource source){
  SimpleImportsSolver importsSolver=new SimpleImportsSolver(problemsHandler);
  InitialScopeExtractor scopeBuilder=new InitialScopeExtractor();
  IScope scope=scopeBuilder.extractScope(less);
  List<PlaceholderScope> importsPlaceholders=scopeBuilder.getImportsPlaceholders();
  solveNestedImports(importsSolver,importsPlaceholders);
  ReferencesSolver referencesSolver=new ReferencesSolver(problemsHandler);
  referencesSolver.solveReferences(less,scope);
}
Program: 85755
Project: 85755
Buggy source:
private void solveNestedImports(LessSource source,ExperimentalImportsSolver importsSolver,List<PlaceholderScope> importsPlaceholders){
  for (  PlaceholderScope placeholder : importsPlaceholders) {
    ASTCssNode importedAst=importsSolver.importEncountered((Import)placeholder.getOwner(),source);
    if (importedAst != null) {
      InitialScopeExtractor importedAstScopeBuilder=new InitialScopeExtractor();
      IScope addThisIntoScopeTree=importedAstScopeBuilder.extractScope(importedAst);
      placeholder.replaceSelf(addThisIntoScopeTree);
      solveNestedImports(source,importsSolver,importedAstScopeBuilder.getImportsPlaceholders());
    }
 else {
      placeholder.removeSelf();
    }
  }
}

Fixed version (ground truth):
private void solveNestedImports(SimpleImportsSolver importsSolver,List<PlaceholderScope> importsPlaceholders){
  for (  PlaceholderScope placeholder : importsPlaceholders) {
    ASTCssNode importedAst=importsSolver.importEncountered((Import)placeholder.getOwner(),placeholder.getOwner().getSource());
    if (importedAst != null) {
      InitialScopeExtractor importedAstScopeBuilder=new InitialScopeExtractor();
      IScope addThisIntoScopeTree=importedAstScopeBuilder.extractScope(importedAst);
      placeholder.replaceSelf(addThisIntoScopeTree);
      List<PlaceholderScope> ip=importedAstScopeBuilder.getImportsPlaceholders();
      solveNestedImports(importsSolver,ip);
    }
 else {
      placeholder.removeSelf();
    }
  }
}
Program: 85757
Project: 85757
Buggy source:
public void extendName(String extension){
  if (isStar) {
    isStar=false;
  }
  getElementName().extendName(extension);
}

Fixed version (ground truth):
public void extendName(String extension){
  if (isStar) {
    isStar=false;
  }
  if (hasElement()) {
    getElementName().extendName(extension);
  }
 else {
    setElementName(new InterpolableName(getUnderlyingStructure(),new FixedNamePart(getUnderlyingStructure(),extension)));
  }
}
Program: 85758
Project: 85758
Buggy source:
@Parameters(name="String_Node_Str") public static Collection<Object[]> allTestsParameters(){
  return createTestFileUtils().loadTestFiles(extendAllMatch1,extendAllMatch2,extendAllMultiple);
}

Fixed version (ground truth):
@Parameters(name="String_Node_Str") public static Collection<Object[]> allTestsParameters(){
  return createTestFileUtils().loadTestFiles(misc,extendAllMatch1,extendAllMatch2,extendAllMultiple);
}
Program: 85759
Project: 85759
Buggy source:
public StringSource(String content,String name){
  this.content=content;
  this.name=name;
}

Fixed version (ground truth):
public StringSource(String content,String name,URI uri){
  this.content=content;
  this.name=name;
  this.uri=uri;
}
Program: 85760
Project: 85760
Buggy source:
@Override public URI getURI(){
  return null;
}

Fixed version (ground truth):
@Override public URI getURI(){
  return uri;
}
Program: 85761
Project: 85761
Buggy source:
private void runAsMultimode(List<String> files,String outputDirectory,boolean generateSourceMap,boolean printPartial){
  if (!FileSystemUtils.ensureDirectory(outputDirectory,print))   return;
  for (  String filename : files) {
    File inputFile=new File(filename);
    String cssFilename=toOutputFilename(outputDirectory,filename,Constants.CSS_SUFFIX);
    String mapFilename=generateSourceMap ? toOutputFilename(outputDirectory,filename,Constants.SOURCE_MAP_SUFFIX) : null;
    try {
      CompilationResult content=compile(inputFile,toFile(cssFilename),generateSourceMap);
      print.printToFiles(content,filename,inputFile,cssFilename,mapFilename);
    }
 catch (    Less4jException ex) {
      CompilationResult partialResult=ex.getPartialResult();
      if (printPartial) {
        print.printToFiles(partialResult,filename,inputFile,cssFilename,mapFilename);
        print.reportErrors(ex,filename,inputFile);
      }
 else {
        print.reportErrorsAndWarnings(ex,filename,inputFile);
      }
      print.reportCouldNotCompileTheFile(filename);
    }
  }
}

Fixed version (ground truth):
private void runAsMultimode(List<String> files,String outputDirectory,boolean generateSourceMap,boolean printPartial){
  if (!FileSystemUtils.ensureDirectory(outputDirectory,print))   return;
  for (  String filename : files) {
    File inputFile=new File(filename);
    String cssFilename=toOutputFilename(outputDirectory,filename,Constants.CSS_SUFFIX);
    String mapFilename=generateSourceMap ? toOutputFilename(outputDirectory,filename,Constants.FULL_SOURCE_MAP_SUFFIX) : null;
    try {
      CompilationResult content=compile(inputFile,toFile(cssFilename),generateSourceMap);
      print.printToFiles(content,filename,inputFile,cssFilename,mapFilename);
    }
 catch (    Less4jException ex) {
      CompilationResult partialResult=ex.getPartialResult();
      if (printPartial) {
        print.printToFiles(partialResult,filename,inputFile,cssFilename,mapFilename);
        print.reportErrors(ex,filename,inputFile);
      }
 else {
        print.reportErrorsAndWarnings(ex,filename,inputFile);
      }
      print.reportCouldNotCompileTheFile(filename);
    }
  }
}
Program: 85762
Project: 85762
Buggy source:
private String singleModeMapFilename(String cssFileName,boolean generateSourceMap){
  return !generateSourceMap || cssFileName == null ? null : FileSystemUtils.changeSuffix(cssFileName,Constants.SOURCE_MAP_SUFFIX);
}

Fixed version (ground truth):
private String singleModeMapFilename(String cssFileName,boolean generateSourceMap){
  return !generateSourceMap || cssFileName == null ? null : FileSystemUtils.addSuffix(cssFileName,Constants.SOURCE_MAP_SUFFIX);
}
Program: 85763
Project: 85763
Buggy source:
private CompilationResult createCompilationResult(ASTCssNode cssStyleSheet,LessSource lessSource,Configuration options){
  LessSource cssDestination=options == null ? null : options.getCssResultLocation();
  CssPrinter builder=new CssPrinter(lessSource,cssDestination);
  builder.append(cssStyleSheet);
  String css=builder.toCss();
  String sourceMap=builder.toSourceMap();
  CompilationResult compilationResult=new CompilationResult(css,sourceMap,problemsHandler.getWarnings());
  return compilationResult;
}

Fixed version (ground truth):
private CompilationResult createCompilationResult(ASTCssNode cssStyleSheet,LessSource lessSource,Configuration options){
  LessSource cssDestination=options == null ? null : options.getCssResultLocation();
  if (cssDestination == null) {
    String guessedCssName=FileSystemUtils.changeSuffix(lessSource.getName(),Constants.CSS_SUFFIX);
    URI guessedURI=FileSystemUtils.changeSuffix(lessSource.getURI(),Constants.CSS_SUFFIX);
    cssDestination=new LessSource.StringSource("String_Node_Str",guessedCssName,guessedURI);
  }
  CssPrinter builder=new CssPrinter(lessSource,cssDestination);
  builder.append(cssStyleSheet);
  String css=builder.toCss();
  String sourceMap=builder.toSourceMap();
  CompilationResult compilationResult=new CompilationResult(css,sourceMap,problemsHandler.getWarnings());
  return compilationResult;
}
Program: 85764
Project: 85764
Buggy source:
public ASTCssNode compileToCss(StyleSheet less,LessSource source,Configuration options){
  resolveImports(less,source);
  resolveReferences(less);
  evaluateExpressions(less);
  bubbleAndMergeMedia(less);
  freeNestedRuleSets(less);
  removeUselessLessElements(less);
  sortTopLevelElements(less);
  removeUselessCharsets(less);
  handleSourceMapLink(less,options);
  validateFinalCss(less);
  return less;
}

Fixed version (ground truth):
public ASTCssNode compileToCss(StyleSheet less,LessSource source,Configuration options){
  resolveImports(less,source);
  resolveReferences(less);
  evaluateExpressions(less);
  bubbleAndMergeMedia(less);
  freeNestedRuleSets(less);
  removeUselessLessElements(less);
  sortTopLevelElements(less);
  removeUselessCharsets(less);
  handleSourceMapLink(less,options,source);
  validateFinalCss(less);
  return less;
}
Program: 85765
Project: 85765
Buggy source:
private void handleSourceMapLink(StyleSheet less,Configuration options){
  if (!options.shouldLinkSourceMap())   return;
  List<Comment> comments=less.getTrailingComments();
  if (!comments.isEmpty())   ArraysUtils.last(comments).setHasNewLine(true);
  String cssResultLocation=getCssResultLocationName(options);
  String url=FileSystemUtils.changeSuffix(cssResultLocation,Constants.SOURCE_MAP_SUFFIX);
  String commentTest="String_Node_Str" + url + "String_Node_Str";
  Comment linkComment=new Comment(less.getUnderlyingStructure(),commentTest,true);
  comments.add(linkComment);
}

Fixed version (ground truth):
private void handleSourceMapLink(StyleSheet less,Configuration options,LessSource source){
  String cssResultLocation=getCssResultLocationName(options,source);
  if (!options.shouldLinkSourceMap() || cssResultLocation == null)   return;
  List<Comment> comments=less.getTrailingComments();
  if (!comments.isEmpty())   ArraysUtils.last(comments).setHasNewLine(true);
  String url=FileSystemUtils.addSuffix(cssResultLocation,Constants.SOURCE_MAP_SUFFIX);
  String commentTest="String_Node_Str" + url + "String_Node_Str";
  Comment linkComment=new Comment(less.getUnderlyingStructure(),commentTest,true);
  comments.add(linkComment);
}
Program: 85766
Project: 85766
Buggy source:
private String getCssResultLocationName(Configuration options){
  LessSource location=options.getCssResultLocation();
  return location == null ? null : location.getName();
}

Fixed version (ground truth):
private String getCssResultLocationName(Configuration options,LessSource source){
  LessSource location=options.getCssResultLocation();
  String name=location == null ? null : location.getName();
  if (name == null)   name=FileSystemUtils.changeSuffix(source.getName(),Constants.CSS_SUFFIX);
  return name;
}
Program: 85767
Project: 85767
Buggy source:
public String toSourceMap(){
  String name=URIUtils.relativizeSourceURIs(lessSource,cssDestination);
  try {
    StringBuilder sb=new StringBuilder();
    generator.appendTo(sb,name);
    return sb.toString();
  }
 catch (  IOException e) {
    throw new IllegalStateException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public String toSourceMap(){
  String name=cssDestination.getName() == null ? "String_Node_Str" : cssDestination.getName();
  try {
    StringBuilder sb=new StringBuilder();
    generator.appendTo(sb,name);
    return sb.toString();
  }
 catch (  IOException e) {
    throw new IllegalStateException("String_Node_Str",e);
  }
}
Program: 85768
Project: 85768
Buggy source:
public SourceMapBuilder(ExtendedStringBuilder cssBuilder,LessSource lessSource,LessSource cssDestination){
  this.cssBuilder=cssBuilder;
  this.lessSource=lessSource;
  this.cssDestination=cssDestination;
  generator=SourceMapGeneratorFactory.getInstance(SourceMapFormat.V3);
}

Fixed version (ground truth):
public SourceMapBuilder(ExtendedStringBuilder cssBuilder,LessSource cssDestination){
  this.cssBuilder=cssBuilder;
  this.cssDestination=cssDestination;
  generator=SourceMapGeneratorFactory.getInstance(SourceMapFormat.V3);
}
Program: 85769
Project: 85769
Buggy source:
public CssPrinter(CssPrinter configureFromPrinter){
  this.lessSource=configureFromPrinter.lessSource;
  this.cssDestination=configureFromPrinter.cssDestination;
  this.cssOnly=new ExtendedStringBuilder(configureFromPrinter.cssOnly);
  this.cssAndSM=new SourceMapBuilder(cssOnly,lessSource,cssDestination);
}

Fixed version (ground truth):
public CssPrinter(CssPrinter configureFromPrinter){
  this.lessSource=configureFromPrinter.lessSource;
  this.cssDestination=configureFromPrinter.cssDestination;
  this.cssOnly=new ExtendedStringBuilder(configureFromPrinter.cssOnly);
  this.cssAndSM=new SourceMapBuilder(cssOnly,cssDestination);
}
Program: 85770
Project: 85770
Buggy source:
public static void main(String[] args) throws Less4jException {
  File inputLessFile=createFile("String_Node_Str","String_Node_Str");
  LessCompiler compiler=new ThreadUnsafeLessCompiler();
  CompilationResult compilationResult=compiler.compile(inputLessFile);
  System.out.println(compilationResult.getCss());
  for (  Problem warning : compilationResult.getWarnings()) {
    System.err.println(format(warning));
  }
  deleteFile(inputLessFile);
}

Fixed version (ground truth):
public static void main(String[] args) throws Less4jException {
  basicFileExample();
  customCssLocationExample1();
  customCssLocationExample2();
  guessedCssLocationExample1();
  guessedCssLocationExample2();
}
Program: 85771
Project: 85771
Buggy source:
@Test public void oneInputFile(){
  String lessFile=inputDir + "String_Node_Str";
  String cssFile=inputDir + "String_Node_Str";
  String mapFile=inputDir + "String_Node_Str";
  fileUtils.removeFile(cssFile);
  CommandLine.main(new String[]{"String_Node_Str",lessFile});
  fileUtils.assertFileContent(cssFile,correctCss("String_Node_Str"));
  fileUtils.assertFileNotExists(mapFile);
  assertNoErrors();
}

Fixed version (ground truth):
@Test public void oneInputFile(){
  String lessFile=inputDir + "String_Node_Str";
  String cssFile=inputDir + "String_Node_Str";
  String mapFile=inputDir + "String_Node_Str";
  fileUtils.removeFiles(cssFile,mapFile);
  CommandLine.main(new String[]{"String_Node_Str",lessFile});
  fileUtils.assertFileContent(cssFile,correctCss("String_Node_Str"));
  fileUtils.assertFileNotExists(mapFile);
  assertNoErrors();
}
Program: 85772
Project: 85772
Buggy source:
private void runAsMultimode(List<String> files,String outputDirectory,boolean generateSourceMap,boolean printPartial){
  if (!FileSystemUtils.ensureDirectory(outputDirectory,print))   return;
  for (  String filename : files) {
    File inputFile=new File(filename);
    String cssFilename=toOutputFilename(outputDirectory,filename,CSS_SUFFIX);
    String mapFilename=generateSourceMap ? toOutputFilename(outputDirectory,filename,SOURCE_MAP_SUFFIX) : null;
    try {
      CompilationResult content=compile(inputFile,toFile(cssFilename),generateSourceMap);
      print.printToFiles(content,filename,inputFile,cssFilename,mapFilename);
    }
 catch (    Less4jException ex) {
      CompilationResult partialResult=ex.getPartialResult();
      if (printPartial) {
        print.printToFiles(partialResult,filename,inputFile,cssFilename,mapFilename);
        print.reportErrors(ex,filename,inputFile);
      }
 else {
        print.reportErrorsAndWarnings(ex,filename,inputFile);
      }
      print.reportCouldNotCompileTheFile(filename);
    }
  }
}

Fixed version (ground truth):
private void runAsMultimode(List<String> files,String outputDirectory,boolean generateSourceMap,boolean printPartial){
  if (!FileSystemUtils.ensureDirectory(outputDirectory,print))   return;
  for (  String filename : files) {
    File inputFile=new File(filename);
    String cssFilename=toOutputFilename(outputDirectory,filename,Constants.CSS_SUFFIX);
    String mapFilename=generateSourceMap ? toOutputFilename(outputDirectory,filename,Constants.SOURCE_MAP_SUFFIX) : null;
    try {
      CompilationResult content=compile(inputFile,toFile(cssFilename),generateSourceMap);
      print.printToFiles(content,filename,inputFile,cssFilename,mapFilename);
    }
 catch (    Less4jException ex) {
      CompilationResult partialResult=ex.getPartialResult();
      if (printPartial) {
        print.printToFiles(partialResult,filename,inputFile,cssFilename,mapFilename);
        print.reportErrors(ex,filename,inputFile);
      }
 else {
        print.reportErrorsAndWarnings(ex,filename,inputFile);
      }
      print.reportCouldNotCompileTheFile(filename);
    }
  }
}
Program: 85773
Project: 85773
Buggy source:
private String singleModeMapFilename(String cssFileName,boolean generateSourceMap){
  return !generateSourceMap || cssFileName == null ? null : FileSystemUtils.changeSuffix(cssFileName,SOURCE_MAP_SUFFIX);
}

Fixed version (ground truth):
private String singleModeMapFilename(String cssFileName,boolean generateSourceMap){
  return !generateSourceMap || cssFileName == null ? null : FileSystemUtils.changeSuffix(cssFileName,Constants.SOURCE_MAP_SUFFIX);
}
Program: 85774
Project: 85774
Buggy source:
public static String changeSuffix(String filename,String dottedSuffix){
  int lastIndexOf=filename.lastIndexOf('.');
  if (lastIndexOf == -1)   return filename + dottedSuffix;
  return filename.substring(0,lastIndexOf) + dottedSuffix;
}

Fixed version (ground truth):
public static FileSource changeSuffix(FileSource source,String dottedSuffix){
  if (source == null)   return null;
  return new LessSource.FileSource(changeSuffix(source.getInputFile(),dottedSuffix));
}
Program: 85775
Project: 85775
Buggy source:
private CompilationResult doCompile(LessSource source,Configuration options) throws Less4jException {
  ANTLRParser.ParseResult result;
  try {
    result=parser.parseStyleSheet(source.getContent(),source);
  }
 catch (  FileNotFound ex) {
    throw new Less4jException(new GeneralProblem("String_Node_Str" + source + "String_Node_Str"),new CompilationResult(null));
  }
catch (  CannotReadFile ex) {
    throw new Less4jException(new GeneralProblem("String_Node_Str" + source + "String_Node_Str"),new CompilationResult(null));
  }
  if (result.hasErrors()) {
    CompilationResult compilationResult=new CompilationResult("String_Node_Str");
    throw new Less4jException(result.getErrors(),compilationResult);
  }
  StyleSheet lessStyleSheet=astBuilder.parse(result.getTree());
  ASTCssNode cssStyleSheet=compiler.compileToCss(lessStyleSheet,source);
  CompilationResult compilationResult=createCompilationResult(cssStyleSheet,source,options);
  return compilationResult;
}

Fixed version (ground truth):
private CompilationResult doCompile(LessSource source,Configuration options) throws Less4jException {
  if (options == null)   options=new Configuration();
  ANTLRParser.ParseResult result;
  try {
    result=parser.parseStyleSheet(source.getContent(),source);
  }
 catch (  FileNotFound ex) {
    throw new Less4jException(new GeneralProblem("String_Node_Str" + source + "String_Node_Str"),new CompilationResult(null));
  }
catch (  CannotReadFile ex) {
    throw new Less4jException(new GeneralProblem("String_Node_Str" + source + "String_Node_Str"),new CompilationResult(null));
  }
  if (result.hasErrors()) {
    CompilationResult compilationResult=new CompilationResult("String_Node_Str");
    throw new Less4jException(result.getErrors(),compilationResult);
  }
  StyleSheet lessStyleSheet=astBuilder.parse(result.getTree());
  ASTCssNode cssStyleSheet=compiler.compileToCss(lessStyleSheet,source,options);
  CompilationResult compilationResult=createCompilationResult(cssStyleSheet,source,options);
  return compilationResult;
}
Program: 85776
Project: 85776
Buggy source:
public ASTCssNode compileToCss(StyleSheet less,LessSource source){
  resolveImports(less,source);
  resolveReferences(less);
  evaluateExpressions(less);
  bubbleAndMergeMedia(less);
  freeNestedRuleSets(less);
  removeUselessLessElements(less);
  sortTopLevelElements(less);
  removeUselessCharsets(less);
  validateFinalCss(less);
  return less;
}

Fixed version (ground truth):
public ASTCssNode compileToCss(StyleSheet less,LessSource source,Configuration options){
  resolveImports(less,source);
  resolveReferences(less);
  evaluateExpressions(less);
  bubbleAndMergeMedia(less);
  freeNestedRuleSets(less);
  removeUselessLessElements(less);
  sortTopLevelElements(less);
  removeUselessCharsets(less);
  handleSourceMapLink(less,options);
  validateFinalCss(less);
  return less;
}
Program: 85777
Project: 85777
Buggy source:
private void handleIndentation(){
  if (onNewLine()) {
    onNewLine=false;
    for (int i=0; i < indentationLevel; i++) {
      builder.append(INDENTATION);
    }
  }
}

Fixed version (ground truth):
public void handleIndentation(){
  if (onNewLine()) {
    onNewLine=false;
    for (int i=0; i < indentationLevel; i++) {
      builder.append(INDENTATION);
    }
  }
}
Program: 85778
Project: 85778
Buggy source:
private void addNewLines(String string){
  line=line + string.split(Constants.NEW_LINE).length - 1;
}

Fixed version (ground truth):
private void addNewLines(String string){
  int addedLines=string.split(Constants.NEW_LINE).length - 1;
  if (string.endsWith(Constants.NEW_LINE))   addedLines++;
  line=line + addedLines;
}
Program: 85779
Project: 85779
Buggy source:
public int getColumn(){
  return builder.length() - builder.lastIndexOf(Constants.NEW_LINE);
}

Fixed version (ground truth):
public int getColumn(){
  int lastNewLine=builder.lastIndexOf(Constants.NEW_LINE);
  return builder.length() - (lastNewLine + 1);
}
Program: 85780
Project: 85780
Buggy source:
private void declarationsAreImportant(GeneralBody result){
  for (  ASTCssNode kid : result.getMembers()) {
    if (kid instanceof Declaration) {
      Declaration declaration=(Declaration)kid;
      declaration.setImportant(true);
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void declarationsAreImportant(Body result){
  for (  ASTCssNode kid : result.getMembers()) {
    if (kid instanceof Declaration) {
      Declaration declaration=(Declaration)kid;
      declaration.setImportant(true);
    }
 else     if (kid instanceof BodyOwner<?>) {
      BodyOwner owner=(BodyOwner)kid;
      declarationsAreImportant(owner.getBody());
    }
  }
}
Program: 85781
Project: 85781
Buggy source:
public Set<ASTCssNodeType> getSupportedMembers(ASTCssNodeType bodyType,ASTCssNodeType ownerType){
switch (bodyType) {
case STYLE_SHEET:
    Set<ASTCssNodeType> result=allNodeTypes();
  result.remove(ASTCssNodeType.DECLARATION);
result.remove(ASTCssNodeType.PAGE_MARGIN_BOX);
return result;
}
if (ownerType == null) return allNodeTypes();
switch (ownerType) {
case VIEWPORT:
return createSet(ASTCssNodeType.DECLARATION);
case RULE_SET:
return createSet(ASTCssNodeType.DECLARATION);
case PAGE:
return createSet(ASTCssNodeType.DECLARATION,ASTCssNodeType.PAGE_MARGIN_BOX);
case PAGE_MARGIN_BOX:
return createSet(ASTCssNodeType.DECLARATION);
case MEDIA:
return createSet(ASTCssNodeType.RULE_SET);
case KEYFRAMES:
return createSet(ASTCssNodeType.RULE_SET);
default :
return allNodeTypes();
}
}

Fixed version (ground truth):
public Set<ASTCssNodeType> getSupportedMembers(ASTCssNodeType bodyType,ASTCssNodeType ownerType){
switch (bodyType) {
case STYLE_SHEET:
    Set<ASTCssNodeType> result=allNodeTypes();
  result.remove(ASTCssNodeType.DECLARATION);
result.remove(ASTCssNodeType.PAGE_MARGIN_BOX);
return result;
}
if (ownerType == null) return allNodeTypes();
switch (ownerType) {
case VIEWPORT:
return createSet(ASTCssNodeType.DECLARATION);
case RULE_SET:
return createSet(ASTCssNodeType.DECLARATION);
case PAGE:
return createSet(ASTCssNodeType.DECLARATION,ASTCssNodeType.PAGE_MARGIN_BOX);
case PAGE_MARGIN_BOX:
return createSet(ASTCssNodeType.DECLARATION);
case MEDIA:
return createSet(ASTCssNodeType.RULE_SET,ASTCssNodeType.PAGE);
case KEYFRAMES:
return createSet(ASTCssNodeType.RULE_SET);
default :
return allNodeTypes();
}
}
Program: 85782
Project: 85782
Buggy source:
private Expression buildFromColorHash(HiddenTokenAwareTree token,HiddenTokenAwareTree first){
  String text=first.getText();
  ColorExpression parsedColor=ConversionUtils.parseColor(token,text);
  if (parsedColor == null) {
    FaultyExpression faultyExpression=new FaultyExpression(token);
    problemsHandler.notAColor(faultyExpression,text);
  }
  return parsedColor;
}

Fixed version (ground truth):
private Expression buildFromColorHash(HiddenTokenAwareTree token,HiddenTokenAwareTree first){
  String text=first.getText();
  ColorExpression parsedColor=ConversionUtils.parseColor(token,text);
  if (parsedColor == null) {
    FaultyExpression faultyExpression=new FaultyExpression(token);
    problemsHandler.notAColor(faultyExpression,text);
    return faultyExpression;
  }
  return parsedColor;
}
Program: 85783
Project: 85783
Buggy source:
private void splitByComma(List<Expression> result,Expression expression){
  if (expression.getType() == ASTCssNodeType.COMPOSED_EXPRESSION) {
    ComposedExpression composed=(ComposedExpression)expression;
    result.addAll(composed.splitByComma());
  }
 else {
    result.add(expression);
  }
}

Fixed version (ground truth):
private List<Expression> splitByComma(Expression expression){
  if (expression.getType() == ASTCssNodeType.COMPOSED_EXPRESSION) {
    ComposedExpression composed=(ComposedExpression)expression;
    return composed.splitByComma();
  }
 else {
    return Arrays.asList(expression);
  }
}
Program: 85784
Project: 85784
Buggy source:
@Override public List<? extends ASTCssNode> getChilds(){
  List<ASTCssNode> result=ArraysUtils.asNonNullList((ASTCssNode)selector);
  result.addAll(positionalParameters);
  return result;
}

Fixed version (ground truth):
@Override public List<? extends ASTCssNode> getChilds(){
  List<ASTCssNode> result=ArraysUtils.asNonNullList((ASTCssNode)selector);
  result.addAll(positionalParameters);
  result.addAll(namedParameters.values());
  return result;
}
Program: 85786
Project: 85786
Buggy source:
private void convertComments(ASTCssNode node){
  inheritCommentsFromToken(node);
  for (  ASTCssNode kid : node.getChilds()) {
    if (kid == null)     System.out.println(node);
    convertComments(kid);
  }
}

Fixed version (ground truth):
private void convertComments(ASTCssNode node){
  inheritCommentsFromToken(node);
  for (  ASTCssNode kid : node.getChilds()) {
    convertComments(kid);
  }
}
Program: 85787
Project: 85787
Buggy source:
public ReusableStructure(HiddenTokenAwareTree token,ElementSubsequent className){
  this(token);
  selectors=Arrays.asList(className);
}

Fixed version (ground truth):
public ReusableStructure(HiddenTokenAwareTree token,List<ElementSubsequent> selectors){
  this(token);
  this.selectors=selectors;
}
Program: 85788
Project: 85788
Buggy source:
public boolean usableAsReusableStructure(){
  return hasSingleClassSelector() || hasSingleIdSelector();
}

Fixed version (ground truth):
public boolean usableAsReusableStructure(){
  for (  Selector selector : selectors) {
    if (isReusableSelector(selector))     return true;
  }
  return false;
}