nus-yam/ex-repair huggingface dataset:
Program: 186272
Project: 186272
Buggy source:
public JavaScriptSquidSensor(RulesProfile profile,FileLinesContextFactory fileLinesContextFactory,ResourcePerspectives resourcePerspectives,FileSystem fileSystem,NoSonarFilter noSonarFilter){
  this.annotationCheckFactory=AnnotationCheckFactory.create(profile,CheckList.REPOSITORY_KEY,CheckList.getChecks());
  this.fileLinesContextFactory=fileLinesContextFactory;
  this.resourcePerspectives=resourcePerspectives;
  this.fileSystem=fileSystem;
  this.noSonarFilter=noSonarFilter;
  this.mainFilePredicate=fileSystem.predicates().and(fileSystem.predicates().hasType(InputFile.Type.MAIN),fileSystem.predicates().hasLanguage(JavaScript.KEY));
}

Fixed version (ground truth):
public JavaScriptSquidSensor(RulesProfile profile,FileLinesContextFactory fileLinesContextFactory,ResourcePerspectives resourcePerspectives,FileSystem fileSystem,NoSonarFilter noSonarFilter,PathResolver pathResolver){
  this.annotationCheckFactory=AnnotationCheckFactory.create(profile,CheckList.REPOSITORY_KEY,CheckList.getChecks());
  this.fileLinesContextFactory=fileLinesContextFactory;
  this.resourcePerspectives=resourcePerspectives;
  this.fileSystem=fileSystem;
  this.noSonarFilter=noSonarFilter;
  this.pathResolver=pathResolver;
  this.mainFilePredicate=fileSystem.predicates().and(fileSystem.predicates().hasType(InputFile.Type.MAIN),fileSystem.predicates().hasLanguage(JavaScript.KEY));
}
Program: 186273
Project: 186273
Buggy source:
@Override public void analyse(Project project,SensorContext context){
  this.context=context;
  List<CodeVisitor> astNodeVisitors=Lists.newArrayList();
  List<JavaScriptFileScanner> treeVisitors=Lists.newArrayList();
  Collection<CodeVisitor> squidChecks=annotationCheckFactory.getChecks();
  for (  CodeVisitor visitor : squidChecks) {
    if (visitor instanceof JavaScriptFileScanner) {
      treeVisitors.add((JavaScriptFileScanner)visitor);
    }
 else {
      astNodeVisitors.add(visitor);
    }
  }
  astNodeVisitors.add(new VisitorsBridge(treeVisitors));
  astNodeVisitors.add(new FileLinesVisitor(fileLinesContextFactory,fileSystem));
  scanner=JavaScriptAstScanner.create(createConfiguration(),astNodeVisitors.toArray(new SquidAstVisitor[astNodeVisitors.size()]));
  scanner.scanFiles(Lists.newArrayList(fileSystem.files(mainFilePredicate)));
  Collection<SourceCode> squidSourceFiles=scanner.getIndex().search(new QueryByType(SourceFile.class));
  save(squidSourceFiles);
}

Fixed version (ground truth):
@Override public void analyse(Project project,SensorContext context){
  this.context=context;
  List<CodeVisitor> astNodeVisitors=Lists.newArrayList();
  List<JavaScriptFileScanner> treeVisitors=Lists.newArrayList();
  Collection<CodeVisitor> squidChecks=annotationCheckFactory.getChecks();
  for (  CodeVisitor visitor : squidChecks) {
    if (visitor instanceof JavaScriptFileScanner) {
      treeVisitors.add((JavaScriptFileScanner)visitor);
    }
 else {
      astNodeVisitors.add(visitor);
    }
  }
  astNodeVisitors.add(new VisitorsBridge(treeVisitors));
  astNodeVisitors.add(new FileLinesVisitor(fileLinesContextFactory,fileSystem,pathResolver));
  scanner=JavaScriptAstScanner.create(createConfiguration(),astNodeVisitors.toArray(new SquidAstVisitor[astNodeVisitors.size()]));
  scanner.scanFiles(Lists.newArrayList(fileSystem.files(mainFilePredicate)));
  Collection<SourceCode> squidSourceFiles=scanner.getIndex().search(new QueryByType(SourceFile.class));
  save(squidSourceFiles);
}
Program: 186274
Project: 186274
Buggy source:
private void save(Collection<SourceCode> squidSourceFiles){
  for (  SourceCode squidSourceFile : squidSourceFiles) {
    SourceFile squidFile=(SourceFile)squidSourceFile;
    InputFile inputFile=fileSystem.inputFile(fileSystem.predicates().hasAbsolutePath(squidFile.getKey()));
    if (inputFile != null) {
      File sonarFile=File.create(inputFile.relativePath());
      noSonarFilter.addResource(sonarFile,squidFile.getNoSonarTagLines());
      saveClassComplexity(sonarFile,squidFile);
      saveFilesComplexityDistribution(sonarFile,squidFile);
      saveFunctionsComplexityAndDistribution(sonarFile,squidFile);
      saveMeasures(sonarFile,squidFile);
      saveIssues(sonarFile,squidFile);
    }
 else {
      LOG.warn("String_Node_Str",squidFile.getKey());
    }
  }
}

Fixed version (ground truth):
private void save(Collection<SourceCode> squidSourceFiles){
  for (  SourceCode squidSourceFile : squidSourceFiles) {
    SourceFile squidFile=(SourceFile)squidSourceFile;
    File sonarFile=context.getResource(File.create(pathResolver.relativePath(fileSystem.baseDir(),new java.io.File(squidFile.getKey()))));
    if (sonarFile != null) {
      noSonarFilter.addResource(sonarFile,squidFile.getNoSonarTagLines());
      saveClassComplexity(sonarFile,squidFile);
      saveFilesComplexityDistribution(sonarFile,squidFile);
      saveFunctionsComplexityAndDistribution(sonarFile,squidFile);
      saveMeasures(sonarFile,squidFile);
      saveIssues(sonarFile,squidFile);
    }
 else {
      LOG.warn("String_Node_Str",squidFile.getKey());
    }
  }
}
Program: 186275
Project: 186275
Buggy source:
@Test public void test_to_string(){
  JavaScriptSquidSensor sensor=new JavaScriptSquidSensor(mock(RulesProfile.class),fileLinesContextFactory,mock(ResourcePerspectives.class),new DefaultFileSystem(),new NoSonarFilter(mock(SensorContext.class)));
  assertThat(sensor.toString()).isNotNull();
}

Fixed version (ground truth):
@Test public void test_to_string(){
  JavaScriptSquidSensor sensor=new JavaScriptSquidSensor(mock(RulesProfile.class),fileLinesContextFactory,mock(ResourcePerspectives.class),new DefaultFileSystem(),new NoSonarFilter(mock(SensorContext.class)),new PathResolver());
  assertThat(sensor.toString()).isNotNull();
}
Program: 186276
Project: 186276
Buggy source:
@Test public void should_execute_if_js_files(){
  DefaultFileSystem localFS=new DefaultFileSystem();
  JavaScriptSquidSensor sensor=new JavaScriptSquidSensor(mock(RulesProfile.class),fileLinesContextFactory,mock(ResourcePerspectives.class),localFS,new NoSonarFilter(mock(SensorContext.class)));
  assertThat(sensor.shouldExecuteOnProject(project)).isFalse();
  localFS.add(new DefaultInputFile("String_Node_Str").setType(InputFile.Type.MAIN).setLanguage(JavaScript.KEY));
  assertThat(sensor.shouldExecuteOnProject(project)).isTrue();
}

Fixed version (ground truth):
@Test public void should_execute_if_js_files(){
  DefaultFileSystem localFS=new DefaultFileSystem();
  JavaScriptSquidSensor sensor=new JavaScriptSquidSensor(mock(RulesProfile.class),fileLinesContextFactory,mock(ResourcePerspectives.class),localFS,new NoSonarFilter(mock(SensorContext.class)),new PathResolver());
  assertThat(sensor.shouldExecuteOnProject(project)).isFalse();
  localFS.add(new DefaultInputFile("String_Node_Str").setType(InputFile.Type.MAIN).setLanguage(JavaScript.KEY));
  assertThat(sensor.shouldExecuteOnProject(project)).isTrue();
}
Program: 186277
Project: 186277
Buggy source:
@Test public void should_analyse(){
  fileSystem.add(new DefaultInputFile("String_Node_Str").setAbsolutePath(TestUtils.getResource("String_Node_Str").getAbsolutePath()).setType(InputFile.Type.MAIN).setLanguage(JavaScript.KEY));
  SensorContext context=mock(SensorContext.class);
  JavaScriptSquidSensor sensor=new JavaScriptSquidSensor(mock(RulesProfile.class),fileLinesContextFactory,mock(ResourcePerspectives.class),fileSystem,new NoSonarFilter(mock(SensorContext.class)));
  sensor.analyse(project,context);
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.LINES),eq(32.0));
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.NCLOC),eq(18.0));
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.CLASSES),eq(1.0));
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.FUNCTIONS),eq(2.0));
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.ACCESSORS),eq(2.0));
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.STATEMENTS),eq(8.0));
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.COMPLEXITY),eq(3.0));
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.COMPLEXITY_IN_CLASSES),eq(0.0));
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.COMMENT_LINES),eq(2.0));
}

Fixed version (ground truth):
@Test public void should_analyse(){
  fileSystem.setBaseDir(TestUtils.getResource("String_Node_Str"));
  fileSystem.add(new DefaultInputFile("String_Node_Str").setAbsolutePath(TestUtils.getResource("String_Node_Str").getAbsolutePath()).setType(InputFile.Type.MAIN).setLanguage(JavaScript.KEY));
  SensorContext context=mock(SensorContext.class);
  when(context.getResource(any(Resource.class))).thenReturn(File.create((new PathResolver()).relativePath(fileSystem.baseDir(),TestUtils.getResource("String_Node_Str"))));
  JavaScriptSquidSensor sensor=new JavaScriptSquidSensor(mock(RulesProfile.class),fileLinesContextFactory,mock(ResourcePerspectives.class),fileSystem,new NoSonarFilter(mock(SensorContext.class)),new PathResolver());
  sensor.analyse(project,context);
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.LINES),eq(32.0));
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.NCLOC),eq(18.0));
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.CLASSES),eq(1.0));
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.FUNCTIONS),eq(2.0));
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.ACCESSORS),eq(2.0));
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.STATEMENTS),eq(8.0));
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.COMPLEXITY),eq(3.0));
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.COMPLEXITY_IN_CLASSES),eq(0.0));
  verify(context).saveMeasure(any(Resource.class),eq(CoreMetrics.COMMENT_LINES),eq(2.0));
}
Program: 186278
Project: 186278
Buggy source:
@Override public SeparatedList<ExpressionTree> parameters(){
  return parameters();
}

Fixed version (ground truth):
@Override public SeparatedList<ExpressionTree> parameters(){
  return parameters;
}
Program: 186279
Project: 186279
Buggy source:
@Override public SeparatedList<ExpressionTree> parameters(){
  return parameters();
}

Fixed version (ground truth):
@Override public SeparatedList<ExpressionTree> parameters(){
  return parameters;
}
Program: 186280
Project: 186280
Buggy source:
@Override public SeparatedList<ExpressionTree> parameters(){
  return parameters();
}

Fixed version (ground truth):
@Override public SeparatedList<ExpressionTree> parameters(){
  return parameters;
}
Program: 186281
Project: 186281
Buggy source:
private void saveClassComplexity(org.sonar.api.resources.File sonarFile,SourceFile squidFile){
  Collection<SourceCode> classes=scanner.getIndex().search(new QueryByParent(squidFile),new QueryByType(SourceClass.class));
  double complexityInClasses=0;
  for (  SourceCode squidClass : classes) {
    double classComplexity=squidClass.getDouble(EcmaScriptMetric.COMPLEXITY);
    complexityInClasses+=classComplexity;
  }
  context.saveMeasure(sonarFile,CoreMetrics.COMPLEXITY_IN_CLASSES,complexityInClasses);
}

Fixed version (ground truth):
private void saveClassComplexity(org.sonar.api.resources.File sonarFile,SourceFile squidFile){
  double complexityInClasses=0;
  Set<SourceCode> children=squidFile.getChildren();
  if (children != null) {
    for (    SourceCode sourceCode : squidFile.getChildren()) {
      if (sourceCode.isType(SourceClass.class)) {
        complexityInClasses+=sourceCode.getDouble(EcmaScriptMetric.COMPLEXITY);
      }
    }
  }
  context.saveMeasure(sonarFile,CoreMetrics.COMPLEXITY_IN_CLASSES,complexityInClasses);
}
Program: 186282
Project: 186282
Buggy source:
public Map<String,CoverageMeasuresBuilder> parse(List<String> lines){
  final Map<String,FileData> files=Maps.newHashMap();
  FileData fileData=new FileData();
  for (  String line : lines) {
    if (line.startsWith(SF)) {
      String filePath=line.substring(SF.length());
      try {
        filePath=LCOVSensor.getIOFile(moduleBaseDir,filePath).getCanonicalPath();
      }
 catch (      IOException e) {
        filePath="String_Node_Str";
      }
      fileData=files.get(filePath);
      if (fileData == null) {
        fileData=new FileData();
        files.put(filePath,fileData);
      }
    }
 else     if (line.startsWith(DA)) {
      String execution=line.substring(DA.length());
      String executionCount=execution.substring(execution.indexOf(',') + 1);
      String lineNumber=execution.substring(0,execution.indexOf(','));
      fileData.addLine(Integer.valueOf(lineNumber),Integer.valueOf(executionCount));
    }
 else     if (line.startsWith(BRDA)) {
      String[] tokens=line.substring(BRDA.length()).trim().split("String_Node_Str");
      String lineNumber=tokens[0];
      String branchNumber=tokens[2];
      String taken=tokens[3];
      fileData.addBranch(Integer.valueOf(lineNumber),branchNumber,"String_Node_Str".equals(taken) ? 0 : Integer.valueOf(taken));
    }
  }
  Map<String,CoverageMeasuresBuilder> coveredFiles=Maps.newHashMap();
  for (  Map.Entry<String,FileData> e : files.entrySet()) {
    coveredFiles.put(e.getKey(),e.getValue().convert());
  }
  return coveredFiles;
}

Fixed version (ground truth):
public Map<String,CoverageMeasuresBuilder> parse(List<String> lines){
  final Map<String,FileData> files=Maps.newHashMap();
  FileData fileData=new FileData();
  for (  String line : lines) {
    if (line.startsWith(SF)) {
      String filePath=line.substring(SF.length());
      try {
        filePath=LCOVSensor.getIOFile(moduleBaseDir,filePath).getCanonicalPath();
      }
 catch (      IOException e) {
        filePath="String_Node_Str";
        LOG.error("String_Node_Str",filePath,e);
      }
      fileData=files.get(filePath);
      if (fileData == null) {
        fileData=new FileData();
        files.put(filePath,fileData);
      }
    }
 else     if (line.startsWith(DA)) {
      String execution=line.substring(DA.length());
      String executionCount=execution.substring(execution.indexOf(',') + 1);
      String lineNumber=execution.substring(0,execution.indexOf(','));
      fileData.addLine(Integer.valueOf(lineNumber),Integer.valueOf(executionCount));
    }
 else     if (line.startsWith(BRDA)) {
      String[] tokens=line.substring(BRDA.length()).trim().split("String_Node_Str");
      String lineNumber=tokens[0];
      String branchNumber=tokens[2];
      String taken=tokens[3];
      fileData.addBranch(Integer.valueOf(lineNumber),branchNumber,"String_Node_Str".equals(taken) ? 0 : Integer.valueOf(taken));
    }
  }
  Map<String,CoverageMeasuresBuilder> coveredFiles=Maps.newHashMap();
  for (  Map.Entry<String,FileData> e : files.entrySet()) {
    coveredFiles.put(e.getKey(),e.getValue().convert());
  }
  return coveredFiles;
}
Program: 186283
Project: 186283
Buggy source:
public JavaScriptCommonRulesEngine(){
  super(JavaScript.KEY);
}

Fixed version (ground truth):
/** 
 * Batch side
 */
public JavaScriptCommonRulesEngine(RulesProfile profile,ProjectFileSystem fs){
  super(JavaScript.KEY,profile,fs);
}
Program: 186284
Project: 186284
Buggy source:
private static void executeCommandForPid(String pid,String command) throws AttachNotSupportedException, IOException, UnsupportedEncodingException {
  VirtualMachine vm=VirtualMachine.attach(pid);
  HotSpotVirtualMachine hvm=(HotSpotVirtualMachine)vm;
  try (InputStream in=hvm.executeJCmd(command)){
    byte b[]=new byte[256];
    int n;
    do {
      n=in.read(b);
      if (n > 0) {
        String s=new String(b,0,n,"String_Node_Str");
        System.out.print(s);
      }
    }
 while (n > 0);
  }
   vm.detach();
}

Fixed version (ground truth):
private static void executeCommandForPid(String pid,String command) throws AttachNotSupportedException, IOException, UnsupportedEncodingException {
  VirtualMachine vm=VirtualMachine.attach(pid);
  HotSpotVirtualMachine hvm=(HotSpotVirtualMachine)vm;
  String lines[]=command.split("String_Node_Str");
  for (  String line : lines) {
    try (InputStream in=hvm.executeJCmd(line)){
      byte b[]=new byte[256];
      int n;
      do {
        n=in.read(b);
        if (n > 0) {
          String s=new String(b,0,n,"String_Node_Str");
          System.out.print(s);
        }
      }
 while (n > 0);
    }
   }
  vm.detach();
}
Program: 186285
Project: 186285
Buggy source:
/** 
 * Create a MulticastSocket bound to the specified socket address. <p> Or, if the address is <code>null</code>, create an unbound socket. <p> <p>If there is a security manager, its <code>checkListen</code> method is first called with the SocketAddress port as its argument to ensure the operation is allowed. This could result in a SecurityException. <p> When the socket is created the  {@link DatagramSocket#setReuseAddress(boolean)} method iscalled to enable the SO_REUSEADDR socket option.
 * @param bindaddr Socket address to bind to, or <code>null</code> foran unbound socket.
 * @exception IOException if an I/O exception occurswhile creating the MulticastSocket
 * @exception SecurityException  if a security manager exists and its<code>checkListen</code> method doesn't allow the operation.
 * @see SecurityManager#checkListen
 * @see java.net.DatagramSocket#setReuseAddress(boolean)
 * @since 1.4
 */
public MulticastSocket(SocketAddress bindaddr) throws IOException {
  super((SocketAddress)null);
  setReuseAddress(true);
  if (bindaddr != null) {
    bind(bindaddr);
  }
}

Fixed version (ground truth):
/** 
 * Create a MulticastSocket bound to the specified socket address. <p> Or, if the address is <code>null</code>, create an unbound socket. <p> <p>If there is a security manager, its <code>checkListen</code> method is first called with the SocketAddress port as its argument to ensure the operation is allowed. This could result in a SecurityException. <p> When the socket is created the  {@link DatagramSocket#setReuseAddress(boolean)} method iscalled to enable the SO_REUSEADDR socket option.
 * @param bindaddr Socket address to bind to, or <code>null</code> foran unbound socket.
 * @exception IOException if an I/O exception occurswhile creating the MulticastSocket
 * @exception SecurityException  if a security manager exists and its<code>checkListen</code> method doesn't allow the operation.
 * @see SecurityManager#checkListen
 * @see java.net.DatagramSocket#setReuseAddress(boolean)
 * @since 1.4
 */
public MulticastSocket(SocketAddress bindaddr) throws IOException {
  super((SocketAddress)null);
  setReuseAddress(true);
  if (bindaddr != null) {
    bind(bindaddr);
  }
  NetworkInterface defaultInterface=NetworkInterface.getDefault();
  if (defaultInterface != null) {
    setNetworkInterface(defaultInterface);
  }
}
Program: 186286
Project: 186286
Buggy source:
protected void close(){
  if (fd != null || fd1 != null) {
    datagramSocketClose();
    fd=null;
    fd1=null;
  }
}

Fixed version (ground truth):
protected void close(){
  if (fd != null || fd1 != null) {
    datagramSocketClose();
    ResourceManager.afterUdpClose();
    fd=null;
    fd1=null;
  }
}
Program: 186287
Project: 186287
Buggy source:
/** 
 * Initializes an APRep object.
 * @param encoding a single DER-encoded value.
 * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data.
 * @exception IOException if an I/O error occurs while reading encoded data.
 * @exception KrbApErrException if the value read from the DER-encoded datastream does not match the pre-defined value.
 */
private void init(DerValue encoding) throws Asn1Exception, KrbApErrException, IOException {
  if (((encoding.getTag() & (byte)(0x1F)) != Krb5.KRB_AP_REP) || (encoding.isApplication() != true) || (encoding.isConstructed() != true))   throw new Asn1Exception(Krb5.ASN1_BAD_ID);
  DerValue der=encoding.getData().getDerValue();
  if (der.getTag() != DerValue.tag_Sequence)   throw new Asn1Exception(Krb5.ASN1_BAD_ID);
  DerValue subDer=der.getData().getDerValue();
  if ((subDer.getTag() & (byte)0x1F) != (byte)0x00)   throw new Asn1Exception(Krb5.ASN1_BAD_ID);
  pvno=subDer.getData().getBigInteger().intValue();
  if (pvno != Krb5.PVNO)   throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION);
  subDer=der.getData().getDerValue();
  if ((subDer.getTag() & (byte)0x1F) != (byte)0x01)   throw new Asn1Exception(Krb5.ASN1_BAD_ID);
  msgType=subDer.getData().getBigInteger().intValue();
  if (msgType != Krb5.KRB_AP_REP)   throw new KrbApErrException(Krb5.KRB_AP_ERR_MSG_TYPE);
  encPart=EncryptedData.parse(der.getData(),(byte)0x02,false);
  if (der.getData().available() > 0)   throw new Asn1Exception(Krb5.ASN1_BAD_ID);
}

Fixed version (ground truth):
/** 
 * Initializes an APRep object.
 * @param encoding a single DER-encoded value.
 * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data.
 * @exception IOException if an I/O error occurs while reading encoded data.
 * @exception KrbApErrException if the value read from the DER-encoded datastream does not match the pre-defined value.
 */
private void init(DerValue encoding) throws Asn1Exception, KrbApErrException, IOException {
  if (((encoding.getTag() & (byte)(0x1F)) != Krb5.KRB_AP_REP) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) {
    throw new Asn1Exception(Krb5.ASN1_BAD_ID);
  }
  DerValue der=encoding.getData().getDerValue();
  if (der.getTag() != DerValue.tag_Sequence) {
    throw new Asn1Exception(Krb5.ASN1_BAD_ID);
  }
  DerValue subDer=der.getData().getDerValue();
  if ((subDer.getTag() & (byte)0x1F) != (byte)0x00) {
    throw new Asn1Exception(Krb5.ASN1_BAD_ID);
  }
  pvno=subDer.getData().getBigInteger().intValue();
  if (pvno != Krb5.PVNO) {
    throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION);
  }
  subDer=der.getData().getDerValue();
  if ((subDer.getTag() & (byte)0x1F) != (byte)0x01) {
    throw new Asn1Exception(Krb5.ASN1_BAD_ID);
  }
  msgType=subDer.getData().getBigInteger().intValue();
  if (msgType != Krb5.KRB_AP_REP) {
    throw new KrbApErrException(Krb5.KRB_AP_ERR_MSG_TYPE);
  }
  encPart=EncryptedData.parse(der.getData(),(byte)0x02,false);
  if (der.getData().available() > 0) {
    throw new Asn1Exception(Krb5.ASN1_BAD_ID);
  }
}
Program: 186288
Project: 186288
Buggy source:
/** 
 * Examines the user agent string whether it is a browser.
 * @param userAgent String of an user agent
 * @param builder Builder for an user agent information
 */
private static void examineAsBrowser(final UserAgent.Builder builder,final Data data){
  Matcher matcher;
  VersionNumber version;
  for (  final Entry<BrowserPattern,Browser> entry : data.getPatternBrowserMap().entrySet()) {
    matcher=entry.getKey().getPattern().matcher(builder.getUserAgentString());
    if (matcher.find()) {
      entry.getValue().copyTo(builder);
      version=VersionParser.parseVersion(matcher.groupCount() > 0 ? matcher.group(1) : "String_Node_Str");
      builder.setVersionNumber(version);
      break;
    }
  }
}

Fixed version (ground truth):
/** 
 * Examines the user agent string whether it is a browser.
 * @param userAgent String of an user agent
 * @param builder Builder for an user agent information
 */
private static void examineAsBrowser(final UserAgent.Builder builder,final Data data){
  Matcher matcher;
  VersionNumber version=VersionNumber.UNKNOWN;
  for (  final Entry<BrowserPattern,Browser> entry : data.getPatternBrowserMap().entrySet()) {
    matcher=entry.getKey().getPattern().matcher(builder.getUserAgentString());
    if (matcher.find()) {
      entry.getValue().copyTo(builder);
      if (matcher.groupCount() > ZERO_MATCHING_GROUPS) {
        version=VersionParser.parseVersion(matcher.group(1) != null ? matcher.group(1) : "String_Node_Str");
      }
      builder.setVersionNumber(version);
      break;
    }
  }
}
Program: 186289
Project: 186289
Buggy source:
private Drawable getScaledDrawableForMimetype(FileHolder holder,Context context){
  Drawable d=getDrawableForMimetype(holder,context);
  if (d == null) {
    return new BitmapDrawable(context.getResources(),BitmapFactory.decodeResource(context.getResources(),R.drawable.ic_launcher_sdcard));
  }
 else {
    int size=(int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,48,context.getResources().getDisplayMetrics());
    return ImageUtils.resizeDrawable(d,size,size);
  }
}

Fixed version (ground truth):
private Drawable getScaledDrawableForMimetype(FileHolder holder,Context context){
  Drawable d=getDrawableForMimetype(holder,context);
  if (d == null) {
    return new BitmapDrawable(context.getResources(),BitmapFactory.decodeResource(context.getResources(),R.drawable.ic_launcher_file));
  }
 else {
    int size=(int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,48,context.getResources().getDisplayMetrics());
    return ImageUtils.resizeDrawable(d,size,size);
  }
}
Program: 186290
Project: 186290
Buggy source:
@Override public void run(){
  if (bitmap != null && mContext != null && !cancel) {
    thumb.imageView.setImageBitmap(bitmap);
    thumb.holder.setIcon(new BitmapDrawable(bitmap));
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (bitmap != null && mContext != null && !cancel) {
    thumb.imageView.setImageBitmap(bitmap);
    thumb.holder.setIcon(new BitmapDrawable(bitmap));
  }
  thumb=null;
}
Program: 186292
Project: 186292
Buggy source:
/** 
 * Called when the activity is first created. 
 */
@Override public void onCreate(Bundle icicle){
  super.onCreate(icicle);
  mDistribution.setFirst(MENU_DISTRIBUTION_START,DIALOG_DISTRIBUTION_START);
  if (mDistribution.showEulaOrNewVersion()) {
    return;
  }
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH)   HomeIconHelper.activity_actionbar_setHomeButtonEnabled(this);
  setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL);
  File data=resolveIntentData();
  mFragment=(SimpleFileListFragment)getSupportFragmentManager().findFragmentByTag(FRAGMENT_TAG);
  if (mFragment == null) {
    mFragment=new SimpleFileListFragment();
    Bundle args=new Bundle();
    if (data == null)     args.putString(FileManagerIntents.EXTRA_DIR_PATH,Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) ? Environment.getExternalStorageDirectory().getAbsolutePath() : "String_Node_Str");
 else     args.putString(FileManagerIntents.EXTRA_DIR_PATH,data.toString());
    mFragment.setArguments(args);
    getSupportFragmentManager().beginTransaction().add(android.R.id.content,mFragment,FRAGMENT_TAG).commit();
  }
}

Fixed version (ground truth):
/** 
 * Called when the activity is first created. 
 */
@Override public void onCreate(Bundle icicle){
  super.onCreate(icicle);
  mDistribution.setFirst(MENU_DISTRIBUTION_START,DIALOG_DISTRIBUTION_START);
  if (mDistribution.showEulaOrNewVersion()) {
    return;
  }
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH)   HomeIconHelper.activity_actionbar_setHomeButtonEnabled(this);
  setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL);
  File data=resolveIntentData();
  mFragment=(SimpleFileListFragment)getSupportFragmentManager().findFragmentByTag(FRAGMENT_TAG);
  if (mFragment == null) {
    mFragment=new SimpleFileListFragment();
    Bundle args=new Bundle();
    if (data == null)     args.putString(FileManagerIntents.EXTRA_DIR_PATH,Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) ? Environment.getExternalStorageDirectory().getAbsolutePath() : "String_Node_Str");
 else     args.putString(FileManagerIntents.EXTRA_DIR_PATH,data.toString());
    mFragment.setArguments(args);
    getSupportFragmentManager().beginTransaction().add(android.R.id.content,mFragment,FRAGMENT_TAG).commit();
  }
 else {
    mFragment.openInformingPathBar(new FileHolder(new File(data.toString()),this));
  }
}
Program: 186293
Project: 186293
Buggy source:
@Override protected void onNewIntent(Intent intent){
  mFragment.open(new FileHolder(FileUtils.getFile(intent.getData()),this));
}

Fixed version (ground truth):
@Override protected void onNewIntent(Intent intent){
  mFragment.openInformingPathBar(new FileHolder(FileUtils.getFile(intent.getData()),this));
}
Program: 186294
Project: 186294
Buggy source:
/** 
 * This is called after the file manager finished.
 */
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
switch (requestCode) {
case REQUEST_CODE_BOOKMARKS:
    if (resultCode == RESULT_OK && data != null) {
      mFragment.open(new FileHolder(new File(data.getStringExtra(BookmarkListActivity.KEY_RESULT_PATH)),this));
    }
  break;
default :
super.onActivityResult(requestCode,resultCode,data);
}
}

Fixed version (ground truth):
/** 
 * This is called after the file manager finished.
 */
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
switch (requestCode) {
case REQUEST_CODE_BOOKMARKS:
    if (resultCode == RESULT_OK && data != null) {
      mFragment.openInformingPathBar(new FileHolder(new File(data.getStringExtra(BookmarkListActivity.KEY_RESULT_PATH)),this));
    }
  break;
default :
super.onActivityResult(requestCode,resultCode,data);
}
}
Program: 186295
Project: 186295
Buggy source:
@Override public void onListItemClick(ListView l,View v,int position,long id){
  FileHolder item=(FileHolder)mAdapter.getItem(position);
  if (mPathBar == null)   open(item);
 else   mPathBar.cd(item.getFile());
}

Fixed version (ground truth):
@Override public void onListItemClick(ListView l,View v,int position,long id){
  FileHolder item=(FileHolder)mAdapter.getItem(position);
  openInformingPathBar(item);
}
Program: 186296
Project: 186296
Buggy source:
/** 
 * Point this Fragment to show the contents of the passed file.
 * @param f If same as current, does nothing.
 */
public void open(FileHolder f){
  if (!f.getFile().exists())   return;
  if (f.getFile().isDirectory()) {
    openDir(f);
  }
 else   if (f.getFile().isFile()) {
    openFile(f);
  }
}

Fixed version (ground truth):
/** 
 * Point this Fragment to show the contents of the passed file.
 * @param f If same as current, does nothing.
 */
private void open(FileHolder f){
  if (!f.getFile().exists())   return;
  if (f.getFile().isDirectory()) {
    openDir(f);
  }
 else   if (f.getFile().isFile()) {
    openFile(f);
  }
}
Program: 186300
Project: 186300
Buggy source:
/** 
 * Return the Drawable that is associated with a specific mime type for the VIEW action.
 * @param mimetype
 * @return
 */
Drawable getDrawableForMimetype(File file,String mimetype){
  if (mimetype == null) {
    return null;
  }
  PackageManager pm=context.getPackageManager();
  if (mimetype.equals(MIME_APK)) {
    String path=file.getPath();
    PackageInfo pInfo=pm.getPackageArchiveInfo(path,PackageManager.GET_ACTIVITIES);
    ApplicationInfo aInfo=pInfo.applicationInfo;
    if (Build.VERSION.SDK_INT >= 8) {
      aInfo.sourceDir=path;
      aInfo.publicSourceDir=path;
    }
    return aInfo.loadIcon(pm);
  }
  Uri data=FileUtils.getUri(file);
  Intent intent=new Intent(Intent.ACTION_VIEW);
  intent.setDataAndType(data,mimetype);
  final List<ResolveInfo> lri=pm.queryIntentActivities(intent,PackageManager.MATCH_DEFAULT_ONLY);
  if (lri != null && lri.size() > 0) {
    int index=0;
    index=lri.size() - 1;
    final ResolveInfo ri=lri.get(index);
    return ri.loadIcon(pm);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Return the Drawable that is associated with a specific mime type for the VIEW action.
 * @param mimetype
 * @return
 */
Drawable getDrawableForMimetype(File file,String mimetype){
  if (mimetype == null) {
    return null;
  }
  PackageManager pm=context.getPackageManager();
  if (mimetype.equals(MIME_APK)) {
    String path=file.getPath();
    PackageInfo pInfo=pm.getPackageArchiveInfo(path,PackageManager.GET_ACTIVITIES);
    if (pInfo != null) {
      ApplicationInfo aInfo=pInfo.applicationInfo;
      if (Build.VERSION.SDK_INT >= 8) {
        aInfo.sourceDir=path;
        aInfo.publicSourceDir=path;
      }
      return aInfo.loadIcon(pm);
    }
  }
  Uri data=FileUtils.getUri(file);
  Intent intent=new Intent(Intent.ACTION_VIEW);
  intent.setDataAndType(data,mimetype);
  final List<ResolveInfo> lri=pm.queryIntentActivities(intent,PackageManager.MATCH_DEFAULT_ONLY);
  if (lri != null && lri.size() > 0) {
    int index=0;
    index=lri.size() - 1;
    final ResolveInfo ri=lri.get(index);
    return ri.loadIcon(pm);
  }
  return null;
}
Program: 186301
Project: 186301
Buggy source:
private void sendFile(File file){
  String filename=file.getName();
  String content="String_Node_Str";
  Log.i(TAG,"String_Node_Str" + filename);
  Log.i(TAG,"String_Node_Str" + content);
  Intent i=new Intent();
  i.setAction(Intent.ACTION_SEND);
  i.setType(mMimeTypes.getMimeType(file.getName()));
  i.putExtra(Intent.EXTRA_SUBJECT,filename);
  i.putExtra(Intent.EXTRA_STREAM,Uri.parse("String_Node_Str" + FileManagerProvider.AUTHORITY + "String_Node_Str"+ file.getAbsolutePath()));
  i=Intent.createChooser(i,getString(R.string.menu_send));
  try {
    startActivity(i);
  }
 catch (  ActivityNotFoundException e) {
    Toast.makeText(this,R.string.send_not_available,Toast.LENGTH_SHORT).show();
    Log.e(TAG,"String_Node_Str");
  }
}

Fixed version (ground truth):
private void sendFile(File file){
  String filename=file.getName();
  String content="String_Node_Str";
  Log.i(TAG,"String_Node_Str" + filename);
  Log.i(TAG,"String_Node_Str" + content);
  Intent i=new Intent();
  i.setAction(Intent.ACTION_SEND);
  i.setType(mMimeTypes.getMimeType(file.getName()));
  i.putExtra(Intent.EXTRA_SUBJECT,filename);
  i.putExtra(Intent.EXTRA_STREAM,Uri.parse("String_Node_Str" + FileManagerProvider.AUTHORITY + file.getAbsolutePath()));
  i=Intent.createChooser(i,getString(R.string.menu_send));
  try {
    startActivity(i);
  }
 catch (  ActivityNotFoundException e) {
    Toast.makeText(this,R.string.send_not_available,Toast.LENGTH_SHORT).show();
    Log.e(TAG,"String_Node_Str");
  }
}
Program: 186302
Project: 186302
Buggy source:
@Override public boolean onCreateOptionsMenu(Menu menu){
  super.onCreateOptionsMenu(menu);
  menu.add(0,MENU_NEW_FOLDER,0,R.string.menu_new_folder).setIcon(android.R.drawable.ic_menu_add).setShortcut('0','f');
  mIncludeMediaScanMenuItem=menu.add(0,MENU_INCLUDE_IN_MEDIA_SCAN,0,R.string.menu_include_in_media_scan).setShortcut('1','s').setIcon(android.R.drawable.ic_menu_gallery);
  mExcludeMediaScanMenuItem=menu.add(0,MENU_EXCLUDE_FROM_MEDIA_SCAN,0,R.string.menu_exclude_from_media_scan).setShortcut('1','s').setIcon(android.R.drawable.ic_menu_gallery);
  UpdateMenu.addUpdateMenu(this,menu,0,MENU_UPDATE,0,R.string.update);
  menu.add(0,MENU_ABOUT,0,R.string.about).setIcon(android.R.drawable.ic_menu_info_details).setShortcut('0','a');
  return true;
}

Fixed version (ground truth):
@Override public boolean onCreateOptionsMenu(Menu menu){
  super.onCreateOptionsMenu(menu);
  menu.add(0,MENU_NEW_FOLDER,0,R.string.menu_new_folder).setIcon(android.R.drawable.ic_menu_add).setShortcut('0','f');
  mIncludeMediaScanMenuItem=menu.add(0,MENU_INCLUDE_IN_MEDIA_SCAN,0,R.string.menu_include_in_media_scan).setShortcut('1','s').setIcon(android.R.drawable.ic_menu_gallery);
  mExcludeMediaScanMenuItem=menu.add(0,MENU_EXCLUDE_FROM_MEDIA_SCAN,0,R.string.menu_exclude_from_media_scan).setShortcut('1','s').setIcon(android.R.drawable.ic_menu_gallery);
  UpdateMenu.addUpdateMenu(this,menu,0,MENU_UPDATE,0,R.string.menu_update);
  menu.add(0,MENU_ABOUT,0,R.string.about).setIcon(android.R.drawable.ic_menu_info_details).setShortcut('0','a');
  return true;
}
Program: 186304
Project: 186304
Buggy source:
@Test public void testEquallyDistributePointsAlong1StartEnd(){
  List<VectorXZ> result1=equallyDistributePointsAlong(1f,true,new VectorXZ(-2,5),new VectorXZ(+4,5));
  List<VectorXYZ> result2=equallyDistributePointsAlong(1f,true,asList(new VectorXYZ(-2,0,5),new VectorXYZ(+4,2,5)));
  for (  List<? extends Vector3D> result : asList(result1,result2)) {
    assertSame(7,result.size());
    assertAlmostEquals(-2,5,result.get(0).xz());
    assertAlmostEquals(-1,5,result.get(1).xz());
    assertAlmostEquals(0,5,result.get(2).xz());
    assertAlmostEquals(+1,5,result.get(3).xz());
    assertAlmostEquals(+2,5,result.get(4).xz());
    assertAlmostEquals(+3,5,result.get(5).xz());
    assertAlmostEquals(+4,5,result.get(6).xz());
  }
}

Fixed version (ground truth):
@Test @SuppressWarnings("String_Node_Str") public void testEquallyDistributePointsAlong1StartEnd(){
  List<VectorXZ> result1=equallyDistributePointsAlong(1f,true,new VectorXZ(-2,5),new VectorXZ(+4,5));
  List<VectorXYZ> result2=equallyDistributePointsAlong(1f,true,asList(new VectorXYZ(-2,0,5),new VectorXYZ(+4,2,5)));
  for (  List<? extends Vector3D> result : asList(result1,result2)) {
    assertSame(7,result.size());
    assertAlmostEquals(-2,5,result.get(0).xz());
    assertAlmostEquals(-1,5,result.get(1).xz());
    assertAlmostEquals(0,5,result.get(2).xz());
    assertAlmostEquals(+1,5,result.get(3).xz());
    assertAlmostEquals(+2,5,result.get(4).xz());
    assertAlmostEquals(+3,5,result.get(5).xz());
    assertAlmostEquals(+4,5,result.get(6).xz());
  }
}
Program: 186305
Project: 186305
Buggy source:
@Test public void testEquallyDistributePointsAlong1NoStartEnd(){
  List<VectorXZ> result1=equallyDistributePointsAlong(1f,false,new VectorXZ(-2,5),new VectorXZ(+4,5));
  List<VectorXYZ> result2=equallyDistributePointsAlong(1f,false,asList(new VectorXYZ(-2,0,5),new VectorXYZ(+4,2,5)));
  for (  List<? extends Vector3D> result : asList(result1,result2)) {
    assertSame(6,result.size());
    assertAlmostEquals(-1.5f,5,result.get(0).xz());
    assertAlmostEquals(-0.5f,5,result.get(1).xz());
    assertAlmostEquals(+0.5f,5,result.get(2).xz());
    assertAlmostEquals(+1.5f,5,result.get(3).xz());
    assertAlmostEquals(+2.5f,5,result.get(4).xz());
    assertAlmostEquals(+3.5f,5,result.get(5).xz());
  }
}

Fixed version (ground truth):
@Test @SuppressWarnings("String_Node_Str") public void testEquallyDistributePointsAlong1NoStartEnd(){
  List<VectorXZ> result1=equallyDistributePointsAlong(1f,false,new VectorXZ(-2,5),new VectorXZ(+4,5));
  List<VectorXYZ> result2=equallyDistributePointsAlong(1f,false,asList(new VectorXYZ(-2,0,5),new VectorXYZ(+4,2,5)));
  for (  List<? extends Vector3D> result : asList(result1,result2)) {
    assertSame(6,result.size());
    assertAlmostEquals(-1.5f,5,result.get(0).xz());
    assertAlmostEquals(-0.5f,5,result.get(1).xz());
    assertAlmostEquals(+0.5f,5,result.get(2).xz());
    assertAlmostEquals(+1.5f,5,result.get(3).xz());
    assertAlmostEquals(+2.5f,5,result.get(4).xz());
    assertAlmostEquals(+3.5f,5,result.get(5).xz());
  }
}
Program: 186306
Project: 186306
Buggy source:
/** 
 * fetches data from any Overpass API instance according to an arbitrary query.
 * @throws IOException 
 */
public OverpassReader(String apiURL,String queryString){
  super(new OverpassSource(apiURL,queryString));
}

Fixed version (ground truth):
/** 
 * fetches data from any Overpass API instance according to an arbitrary query. 
 */
public OverpassReader(String apiURL,String queryString){
  super(new OverpassSource(apiURL,queryString));
}
Program: 186307
Project: 186307
Buggy source:
/** 
 * similar to   {@link #applyProjectionMatrices(GL2,Projection)}, but allows rendering only a part of the "normal" image.
 */
static final void applyProjectionMatricesForPart(PMVMatrix pmvMatrix,Projection projection,double xStart,double xEnd,double yStart,double yEnd){
  if ((xStart != 0 || xEnd != 1 || yStart != 0 || yEnd != 1) && !projection.isOrthographic()) {
    throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  }
  pmvMatrix.glMatrixMode(GL_PROJECTION);
  pmvMatrix.glLoadIdentity();
  if (projection.isOrthographic()) {
    double volumeWidth=projection.getAspectRatio() * projection.getVolumeHeight();
    pmvMatrix.glOrthof((float)((-0.5 + xStart) * volumeWidth),(float)((-0.5 + xEnd) * volumeWidth),(float)((-0.5 + yStart) * projection.getVolumeHeight()),(float)((-0.5 + yEnd) * projection.getVolumeHeight()),(float)(projection.getNearClippingDistance()),(float)(projection.getFarClippingDistance()));
  }
 else {
    pmvMatrix.gluPerspective((float)(projection.getVertAngle()),(float)(projection.getAspectRatio()),(float)(projection.getNearClippingDistance()),(float)(projection.getFarClippingDistance()));
  }
  pmvMatrix.glMatrixMode(GL_MODELVIEW);
}

Fixed version (ground truth):
/** 
 * similar to   {@link #applyProjectionMatrices(PMVMatrix,Projection)}, but allows rendering only a part of the "normal" image.
 */
static final void applyProjectionMatricesForPart(PMVMatrix pmvMatrix,Projection projection,double xStart,double xEnd,double yStart,double yEnd){
  if ((xStart != 0 || xEnd != 1 || yStart != 0 || yEnd != 1) && !projection.isOrthographic()) {
    throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  }
  pmvMatrix.glMatrixMode(GL_PROJECTION);
  pmvMatrix.glLoadIdentity();
  if (projection.isOrthographic()) {
    double volumeWidth=projection.getAspectRatio() * projection.getVolumeHeight();
    pmvMatrix.glOrthof((float)((-0.5 + xStart) * volumeWidth),(float)((-0.5 + xEnd) * volumeWidth),(float)((-0.5 + yStart) * projection.getVolumeHeight()),(float)((-0.5 + yEnd) * projection.getVolumeHeight()),(float)(projection.getNearClippingDistance()),(float)(projection.getFarClippingDistance()));
  }
 else {
    pmvMatrix.gluPerspective((float)(projection.getVertAngle()),(float)(projection.getAspectRatio()),(float)(projection.getNearClippingDistance()),(float)(projection.getFarClippingDistance()));
  }
  pmvMatrix.glMatrixMode(GL_MODELVIEW);
}
Program: 186308
Project: 186308
Buggy source:
public JOGLRenderingParameters(){
  this.frontFace=null;
  this.wireframe=false;
  this.useZBuffer=false;
  this.drawBoundingBox=false;
  this.useShadowVolumes=false;
  this.useShadowMaps=false;
  this.shadowMapWidth=0;
  this.shadowMapHeight=0;
  this.shadowMapCameraFrustumPadding=0;
  this.useSSAO=false;
  this.SSAOkernelSize=0;
  this.SSAOradius=0;
  this.overwriteProjectionClippingPlanes=false;
}

Fixed version (ground truth):
public JOGLRenderingParameters(){
  this.frontFace=null;
  this.wireframe=false;
  this.useZBuffer=true;
  this.drawBoundingBox=false;
  this.useShadowVolumes=false;
  this.useShadowMaps=false;
  this.shadowMapWidth=0;
  this.shadowMapHeight=0;
  this.shadowMapCameraFrustumPadding=0;
  this.useSSAO=false;
  this.SSAOkernelSize=0;
  this.SSAOradius=0;
  this.overwriteProjectionClippingPlanes=false;
}
Program: 186309
Project: 186309
Buggy source:
public TextRendererShader(GL2ES2 gl){
  this.gl=gl;
  try {
    textRendererFont=FontFactory.getDefault().get(FontSet.FAMILY_REGULAR,FontSet.STYLE_SERIF);
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
  RenderState renderState=RenderState.createRenderState(new ShaderState(),SVertex.factory());
  textRenderer=TextRenderer.create(renderState,0);
  textRenderer.init(gl);
  if (!textRenderer.isInitialized()) {
    throw new IllegalStateException("String_Node_Str");
  }
}

Fixed version (ground truth):
public TextRendererShader(GL2ES2 gl){
  this.gl=gl;
  try {
    textRendererFont=FontFactory.getDefault().get(FontSet.FAMILY_REGULAR,FontSet.STYLE_SERIF);
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
  RenderState renderState=RenderState.createRenderState(new ShaderState(),SVertex.factory());
  textRenderer=TextRenderer.create(renderState,0);
  textRenderer.init(gl);
  if (!textRenderer.isInitialized()) {
    throw new IllegalStateException("String_Node_Str");
  }
  textRenderer.enable(gl,true);
  textRenderer.enable(gl,false);
}
Program: 186311
Project: 186311
Buggy source:
private static JOGLTarget createJOGLTarget(GL gl,Results results,Configuration config){
  JOGLTarget target;
  if ("String_Node_Str".equals(config.getString("String_Node_Str"))) {
    boolean shadowVolumes="String_Node_Str".equals(config.getString("String_Node_Str"));
    boolean shadowMaps="String_Node_Str".equals(config.getString("String_Node_Str"));
    target=new JOGLTargetShader(gl.getGL3(),new JOGLRenderingParameters(CCW,false,true,shadowVolumes,shadowMaps),GlobalLightingParameters.DEFAULT);
  }
 else {
    target=new JOGLTargetFixedFunction(gl.getGL2(),new JOGLRenderingParameters(CCW,false,true,false,false),GlobalLightingParameters.DEFAULT);
  }
  target.setConfiguration(config);
  boolean underground=config.getBoolean("String_Node_Str",true);
  TargetUtil.renderWorldObjects(target,results.getMapData(),underground);
  target.finish();
  return target;
}

Fixed version (ground truth):
private static JOGLTarget createJOGLTarget(GL gl,Results results,Configuration config){
  JOGLTarget target;
  if ("String_Node_Str".equals(config.getString("String_Node_Str"))) {
    boolean shadowVolumes="String_Node_Str".equals(config.getString("String_Node_Str")) || "String_Node_Str".equals(config.getString("String_Node_Str"));
    boolean shadowMaps="String_Node_Str".equals(config.getString("String_Node_Str")) || "String_Node_Str".equals(config.getString("String_Node_Str"));
    target=new JOGLTargetShader(gl.getGL3(),new JOGLRenderingParameters(CCW,false,true,shadowVolumes,shadowMaps),GlobalLightingParameters.DEFAULT);
  }
 else {
    target=new JOGLTargetFixedFunction(gl.getGL2(),new JOGLRenderingParameters(CCW,false,true,false,false),GlobalLightingParameters.DEFAULT);
  }
  target.setConfiguration(config);
  boolean underground=config.getBoolean("String_Node_Str",true);
  TargetUtil.renderWorldObjects(target,results.getMapData(),underground);
  target.finish();
  return target;
}
Program: 186312
Project: 186312
Buggy source:
public DepthBufferShader(GL3 gl){
  super(gl,"String_Node_Str");
  vertexPositionID=gl.glGetAttribLocation(shaderProgram,"String_Node_Str");
  for (int i=0; i < BumpMapShader.MAX_TEXTURE_LAYERS; i++)   vertexTexCoordID[i]=gl.glGetAttribLocation(shaderProgram,"String_Node_Str" + i + "String_Node_Str");
  modelViewProjectionMatrixID=gl.glGetUniformLocation(shaderProgram,"String_Node_Str");
  pmvMat=new PMVMatrix();
}

Fixed version (ground truth):
public DepthBufferShader(GL3 gl){
  super(gl,"String_Node_Str");
  vertexPositionID=gl.glGetAttribLocation(shaderProgram,"String_Node_Str");
  for (int i=0; i < BumpMapShader.MAX_TEXTURE_LAYERS; i++)   vertexTexCoordID[i]=gl.glGetAttribLocation(shaderProgram,"String_Node_Str" + i + "String_Node_Str");
  modelViewProjectionMatrixID=gl.glGetUniformLocation(shaderProgram,"String_Node_Str");
}
Program: 186314
Project: 186314
Buggy source:
public ShadowMapShader(GL3 gl){
  super(gl);
  initializeShadowMap();
}

Fixed version (ground truth):
public ShadowMapShader(GL3 gl){
  super(gl);
  pmvMat=new PMVMatrix();
  initializeShadowMap();
}