nus-yam/ex-repair huggingface dataset:
Program: 47710
Project: 47710
Buggy source:
private String getClassName(AstNode expr){
  StringBuilder builder=new StringBuilder();
  for (  Token token : expr.getTokens()) {
    if (token.getType() != PHPKeyword.NAMESPACE) {
      builder.append(token.getOriginalValue());
    }
  }
  return builder.toString();
}

Fixed version (ground truth):
private String getClassName(AstNode expr){
  StringBuilder builder=new StringBuilder();
  for (  Token token : expr.getTokens()) {
    if (token.getType() == PHPPunctuator.LPARENTHESIS) {
      break;
    }
    if (token.getType() != PHPKeyword.NAMESPACE) {
      builder.append(token.getOriginalValue());
    }
  }
  return builder.toString();
}
Program: 47711
Project: 47711
Buggy source:
private String getInstantiatedClassName(AstNode newExpr){
  AstNode classNameNode=newExpr.getFirstChild(PHPGrammar.VARIABLE).getFirstChild();
  if (classNameNode.is(PHPKeyword.NAMESPACE,PHPGrammar.CLASS_NAME,GenericTokenType.IDENTIFIER) && classNameNode.getFirstChild().isNot(PHPKeyword.STATIC)) {
    return getClassName(classNameNode);
  }
  return null;
}

Fixed version (ground truth):
private String getInstantiatedClassName(AstNode newExpr){
  AstNode variable=newExpr.getFirstChild(PHPGrammar.VARIABLE);
  AstNode classNameNode=variable.getFirstChild();
  if (classNameNode.is(PHPKeyword.NAMESPACE)) {
    return getClassName(variable);
  }
 else   if (classNameNode.is(PHPGrammar.CLASS_NAME,GenericTokenType.IDENTIFIER) && classNameNode.getFirstChild().isNot(PHPKeyword.STATIC)) {
    return getClassName(classNameNode);
  }
 else {
    return null;
  }
}
Program: 47712
Project: 47712
Buggy source:
@Override public void leaveNode(AstNode astNode){
  if (astNode.is(PHPGrammar.BLOCK) && isFunctionBlock(astNode)) {
    if (getReturnStatementCounter() > max) {
      getContext().createLineViolation(this,"String_Node_Str",astNode,getReturnStatementCounter(),max);
    }
    returnStatementCounter.pop();
  }
}

Fixed version (ground truth):
@Override public void leaveNode(AstNode astNode){
  if (astNode.is(PHPGrammar.BLOCK) && isFunctionBlock(astNode)) {
    if (getReturnStatementCounter() > max) {
      getContext().createLineViolation(this,"String_Node_Str",astNode.getParent(),getReturnStatementCounter(),max);
    }
    returnStatementCounter.pop();
  }
}
Program: 47713
Project: 47713
Buggy source:
@Test public void single_line_shell_comment(){
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void single_line_shell_comment(){
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
}
Program: 47714
Project: 47714
Buggy source:
@Test public void single_line_comment(){
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void single_line_comment(){
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
  assertThat(lexer.lex("String_Node_Str"),hasComment("String_Node_Str"));
}
Program: 47715
Project: 47715
Buggy source:
/** 
 * Returns <code>true</code> if the given project language is PHP and the project configuration is set to allow plugin to run.
 * @param Project the project
 * @return bool
 * @see org.sonar.api.batch.CheckProject#shouldExecuteOnProject(org.sonar.api.resources.Project)
 */
public boolean shouldExecuteOnProject(Project project){
  if (!PHP.equals(project.getLanguage())) {
    return false;
  }
  Configuration configuration=project.getConfiguration();
  boolean skip=configuration.getBoolean(PHPCS_SKIP_KEY,!configuration.getBoolean(PHPCS_SHOULD_RUN_KEY,!parseBoolean(PHPCS_DEFAULT_SKIP)));
  if (skip) {
    return false;
  }
  if (!project.getReuseExistingRulesConfig() || profile.getActiveRulesByRepository(PHPCS_REPOSITORY_KEY).isEmpty()) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Returns <code>true</code> if the given project language is PHP and the project configuration is set to allow plugin to run.
 * @param Project the project
 * @return bool
 * @see org.sonar.api.batch.CheckProject#shouldExecuteOnProject(org.sonar.api.resources.Project)
 */
public boolean shouldExecuteOnProject(Project project){
  if (!PHP.equals(project.getLanguage())) {
    return false;
  }
  Configuration configuration=project.getConfiguration();
  boolean skip=configuration.getBoolean(PHPCS_SKIP_KEY,!configuration.getBoolean(PHPCS_SHOULD_RUN_KEY,!parseBoolean(PHPCS_DEFAULT_SKIP)));
  if (skip) {
    return false;
  }
  if (!project.getReuseExistingRulesConfig() && profile.getActiveRulesByRepository(PHPCS_REPOSITORY_KEY).isEmpty()) {
    return false;
  }
  return true;
}
Program: 47716
Project: 47716
Buggy source:
/** 
 * Parses the.
 * @param coverageReportFile the coverage report file
 */
public void parse(File coverageReportFile){
  if (coverageReportFile == null) {
    insertZeroWhenNoReports();
  }
 else {
    logger.info("String_Node_Str",coverageReportFile.getName());
    parseFile(context,coverageReportFile);
  }
}

Fixed version (ground truth):
/** 
 * Parses the.
 * @param coverageReportFile the coverage report file
 */
public void parse(File coverageReportFile){
  if (coverageReportFile == null) {
    insertZeroWhenNoReports();
  }
 else {
    logger.info("String_Node_Str" + coverageReportFile.getAbsolutePath());
    parseFile(context,coverageReportFile);
  }
}
Program: 47717
Project: 47717
Buggy source:
/** 
 * Gets the test suites.
 * @param report the report
 * @return the test suites
 */
private TestSuites getTestSuites(File report){
  InputStream inputStream=null;
  try {
    XStream xstream=new XStream();
    xstream.setClassLoader(getClass().getClassLoader());
    xstream.aliasSystemAttribute("String_Node_Str","String_Node_Str");
    xstream.processAnnotations(TestSuites.class);
    xstream.processAnnotations(TestSuite.class);
    xstream.processAnnotations(TestCase.class);
    inputStream=new FileInputStream(report);
    TestSuites testSuites=(TestSuites)xstream.fromXML(inputStream);
    Log.debug("String_Node_Str" + testSuites);
    return testSuites;
  }
 catch (  IOException e) {
    throw new SonarException("String_Node_Str" + report.getAbsolutePath(),e);
  }
 finally {
    IOUtils.closeQuietly(inputStream);
  }
}

Fixed version (ground truth):
/** 
 * Gets the test suites.
 * @param report the report
 * @return the test suites
 */
private TestSuites getTestSuites(File report){
  InputStream inputStream=null;
  try {
    XStream xstream=new XStream();
    xstream.setClassLoader(getClass().getClassLoader());
    xstream.aliasSystemAttribute("String_Node_Str","String_Node_Str");
    xstream.processAnnotations(TestSuites.class);
    xstream.processAnnotations(TestSuite.class);
    xstream.processAnnotations(TestCase.class);
    inputStream=new FileInputStream(report);
    TestSuites testSuites=(TestSuites)xstream.fromXML(inputStream);
    LOG.debug("String_Node_Str" + testSuites);
    return testSuites;
  }
 catch (  IOException e) {
    throw new SonarException("String_Node_Str" + report.getAbsolutePath(),e);
  }
 finally {
    IOUtils.closeQuietly(inputStream);
  }
}
Program: 47718
Project: 47718
Buggy source:
/** 
 * Collect the metrics found.
 * @param reportFile the reports directories to be scan
 */
protected void parse(File reportFile){
  if (reportFile == null) {
    insertZeroWhenNoReports(context);
  }
 else {
    logger.info("String_Node_Str",reportFile);
    parseFile(context,reportFile,project);
  }
}

Fixed version (ground truth):
/** 
 * Collect the metrics found.
 * @param reportFile the reports directories to be scan
 */
protected void parse(File reportFile){
  if (reportFile == null) {
    insertZeroWhenNoReports(context);
  }
 else {
    LOG.info("String_Node_Str" + reportFile.getAbsolutePath());
    parseFile(context,reportFile,project);
  }
}
Program: 47720
Project: 47720
Buggy source:
public boolean init(StepMetaInterface stepMetaInterface,StepDataInterface stepDataInterface){
  boolean init=super.init(stepMetaInterface,stepDataInterface);
  Preconditions.checkNotNull(stepMetaInterface);
  mqttConsumerMeta=(MQTTConsumerMeta)stepMetaInterface;
  RowMeta rowMeta=new RowMeta();
  try {
    mqttConsumerMeta.getFields(rowMeta,getStepname(),null,null,this,repository,metaStore);
  }
 catch (  KettleStepException e) {
    logger.error(getString(PKG,"String_Node_Str"),e);
  }
  window=new FixedTimeStreamWindow<>(subtransExecutor,rowMeta,getDuration(),getBatchSize());
  try {
    final List<String> topics=mqttConsumerMeta.getTopics();
    source=new MQTTStreamSource(environmentSubstitute(mqttConsumerMeta.getMqttServer()),Arrays.asList(environmentSubstitute(topics.toArray(new String[topics.size()]))),Integer.parseInt(environmentSubstitute(mqttConsumerMeta.getQos())),this);
  }
 catch (  NumberFormatException e) {
    log.logError(BaseMessages.getString(PKG,"String_Node_Str",environmentSubstitute(mqttConsumerMeta.getQos())));
    return false;
  }
  return init;
}

Fixed version (ground truth):
public boolean init(StepMetaInterface stepMetaInterface,StepDataInterface stepDataInterface){
  boolean init=super.init(stepMetaInterface,stepDataInterface);
  Preconditions.checkNotNull(stepMetaInterface);
  mqttConsumerMeta=(MQTTConsumerMeta)stepMetaInterface;
  RowMeta rowMeta=new RowMeta();
  try {
    mqttConsumerMeta.getFields(rowMeta,getStepname(),null,null,this,repository,metaStore);
  }
 catch (  KettleStepException e) {
    logger.error(getString(PKG,"String_Node_Str"),e);
  }
  window=new FixedTimeStreamWindow<>(subtransExecutor,rowMeta,getDuration(),getBatchSize());
  try {
    final List<String> topics=mqttConsumerMeta.getTopics();
    source=new MQTTStreamSource(environmentSubstitute(mqttConsumerMeta.getMqttServer()),Arrays.asList(environmentSubstitute(topics.toArray(new String[topics.size()]))),Integer.parseInt(environmentSubstitute(mqttConsumerMeta.getQos())),this);
  }
 catch (  NumberFormatException e) {
    logError(BaseMessages.getString(PKG,"String_Node_Str",environmentSubstitute(mqttConsumerMeta.getQos())));
    return false;
  }
  return init;
}
Program: 47721
Project: 47721
Buggy source:
@Override public synchronized boolean processRow(StepMetaInterface smi,StepDataInterface sdi) throws KettleException {
  try {
    Object[] currentRow=getRow();
    if (data.output == null) {
      if (currentRow == null) {
        setOutputDone();
        return true;
      }
      init(getInputRowMeta());
    }
    if (currentRow != null) {
      RowMetaAndData row=new RowMetaAndData(getInputRowMeta(),currentRow);
      data.writer.write(row);
      putRow(row.getRowMeta(),row.getData());
      return true;
    }
 else {
      closeWriter();
      setOutputDone();
      return false;
    }
  }
 catch (  KettleException ex) {
    throw ex;
  }
catch (  Exception ex) {
    throw new KettleException(ex);
  }
}

Fixed version (ground truth):
@Override public synchronized boolean processRow(StepMetaInterface smi,StepDataInterface sdi) throws KettleException {
  try {
    Object[] currentRow=getRow();
    if (data.output == null) {
      if (currentRow == null) {
        setOutputDone();
        return true;
      }
      init(getInputRowMeta());
    }
    if (currentRow != null) {
      RowMetaAndData row=new RowMetaAndData(getInputRowMeta(),currentRow);
      data.writer.write(row);
      putRow(row.getRowMeta(),row.getData());
      return true;
    }
 else {
      closeWriter();
      setOutputDone();
      return false;
    }
  }
 catch (  KettleException ex) {
    try {
      closeWriter();
    }
 catch (    Exception ex2) {
    }
    throw ex;
  }
catch (  Exception ex) {
    try {
      closeWriter();
    }
 catch (    Exception ex2) {
    }
    throw new KettleException(ex);
  }
}
Program: 47723
Project: 47723
Buggy source:
@Override public synchronized boolean processRow(StepMetaInterface smi,StepDataInterface sdi) throws KettleException {
  try {
    meta=(AvroOutputMeta)smi;
    data=(AvroOutputData)sdi;
    if (data.output == null) {
      init();
    }
    Object[] currentRow=getRow();
    if (currentRow != null) {
      RowMetaInterface outputRMI=new RowMeta();
      Object[] outputData=new Object[meta.getOutputFields().size()];
      for (int i=0; i < meta.getOutputFields().size(); i++) {
        int inputRowIndex=getInputRowMeta().indexOfValue(meta.getOutputFields().get(i).getName());
        if (inputRowIndex == -1) {
          throw new KettleException("String_Node_Str" + meta.getOutputFields().get(i).getName() + "String_Node_Str");
        }
 else {
          ValueMetaInterface vmi=ValueMetaFactory.cloneValueMeta(getInputRowMeta().getValueMeta(inputRowIndex));
          vmi.setName(meta.getOutputFields().get(i).getPath());
          outputRMI.addValueMeta(i,vmi);
          outputData[i]=currentRow[inputRowIndex];
        }
      }
      data.writer.write(new RowMetaAndData(outputRMI,outputData));
      return true;
    }
 else {
      closeWriter();
      setOutputDone();
      return false;
    }
  }
 catch (  KettleException ex) {
    throw ex;
  }
catch (  Exception ex) {
    throw new KettleException(ex);
  }
}

Fixed version (ground truth):
@Override public synchronized boolean processRow(StepMetaInterface smi,StepDataInterface sdi) throws KettleException {
  try {
    meta=(AvroOutputMeta)smi;
    data=(AvroOutputData)sdi;
    if (data.output == null) {
      init();
    }
    Object[] currentRow=getRow();
    if (currentRow != null) {
      RowMetaInterface outputRMI=new RowMeta();
      Object[] outputData=new Object[meta.getOutputFields().size()];
      for (int i=0; i < meta.getOutputFields().size(); i++) {
        int inputRowIndex=getInputRowMeta().indexOfValue(meta.getOutputFields().get(i).getPath());
        if (inputRowIndex == -1) {
          throw new KettleException("String_Node_Str" + meta.getOutputFields().get(i).getName() + "String_Node_Str"+ meta.getOutputFields().get(i).getPath()+ "String_Node_Str");
        }
 else {
          ValueMetaInterface vmi=ValueMetaFactory.cloneValueMeta(getInputRowMeta().getValueMeta(inputRowIndex));
          vmi.setName(meta.getOutputFields().get(i).getName());
          outputRMI.addValueMeta(i,vmi);
          outputData[i]=currentRow[inputRowIndex];
        }
      }
      data.writer.write(new RowMetaAndData(outputRMI,outputData));
      return true;
    }
 else {
      closeWriter();
      setOutputDone();
      return false;
    }
  }
 catch (  KettleException ex) {
    throw ex;
  }
catch (  Exception ex) {
    throw new KettleException(ex);
  }
}
Program: 47724
Project: 47724
Buggy source:
private MetaStoreFactory<NamedClusterImpl> getMetaStoreFactory(IMetaStore metastore){
  MetaStoreFactory<NamedClusterImpl> namedClusterMetaStoreFactory=factoryMap.get(metastore);
  if (namedClusterMetaStoreFactory == null) {
    if (metastore instanceof EmbeddedMetaStore) {
      namedClusterMetaStoreFactory=new MetaStoreFactory<>(NamedClusterImpl.class,metastore,NamedClusterEmbedManager.NAMESPACE);
    }
 else {
      namedClusterMetaStoreFactory=new MetaStoreFactory<>(NamedClusterImpl.class,metastore,PentahoDefaults.NAMESPACE);
    }
    factoryMap.put(metastore,namedClusterMetaStoreFactory);
  }
  return namedClusterMetaStoreFactory;
}

Fixed version (ground truth):
/** 
 * returns a NamedClusterMetaStoreFactory for a given MetaStore instance. NOTE:  This method caches and returns a factory for Embedded MetaStores.  For all other MetaStores, a new instance of MetaStoreFactory will always be returned.
 * @param metastore - the MetaStore for which to to get a MetaStoreFactory.
 * @return a MetaStoreFactory for the given MetaStore.
 */
@VisibleForTesting MetaStoreFactory<NamedClusterImpl> getMetaStoreFactory(IMetaStore metastore){
  MetaStoreFactory<NamedClusterImpl> namedClusterMetaStoreFactory=null;
  if (!(metastore instanceof EmbeddedMetaStore)) {
    return new MetaStoreFactory<>(NamedClusterImpl.class,metastore,PentahoDefaults.NAMESPACE);
  }
  namedClusterMetaStoreFactory=factoryMap.get(metastore);
  if (namedClusterMetaStoreFactory == null) {
    namedClusterMetaStoreFactory=new MetaStoreFactory<>(NamedClusterImpl.class,metastore,NamedClusterEmbedManager.NAMESPACE);
    factoryMap.put(metastore,namedClusterMetaStoreFactory);
  }
  return namedClusterMetaStoreFactory;
}
Program: 47725
Project: 47725
Buggy source:
@Before @SuppressWarnings("String_Node_Str") public void setup(){
  metaStore=mock(IMetaStore.class);
  metaStoreFactory=mock(MetaStoreFactory.class);
  namedClusterManager=new NamedClusterManager();
  namedClusterManager.putMetaStoreFactory(metaStore,metaStoreFactory);
}

Fixed version (ground truth):
@Before @SuppressWarnings("String_Node_Str") public void setup(){
  metaStore=mock(IMetaStore.class);
  metaStoreFactory=mock(MetaStoreFactory.class);
  namedClusterManager=new NamedClusterManager();
  namedClusterManager=spy(namedClusterManager);
  doReturn(metaStoreFactory).when(namedClusterManager).getMetaStoreFactory(metaStore);
  namedClusterManager.putMetaStoreFactory(metaStore,metaStoreFactory);
}
Program: 47726
Project: 47726
Buggy source:
public void connect(){
  NamedCluster nc=getNamedClusterWidget().getSelectedNamedCluster();
  HadoopVfsConnection hdfsConnection=new HadoopVfsConnection(nc,getVariableSpace());
  hdfsConnection.setCustomParameters(Props.getInstance());
  schemeName=NamedClusterImpl.WASB_SCHEME.equals(nc.getStorageScheme()) ? NamedClusterImpl.WASB_SCHEME : NamedClusterImpl.HDFS_SCHEME;
  FileObject root=rootFile;
  try {
    root=KettleVFS.getFileObject(hdfsConnection.getConnectionString(schemeName));
  }
 catch (  KettleFileException exc) {
    showMessageAndLog(BaseMessages.getString(PKG,"String_Node_Str"),BaseMessages.getString(PKG,"String_Node_Str"),exc.getMessage());
  }
  vfsFileChooserDialog.setRootFile(root);
  vfsFileChooserDialog.setSelectedFile(root);
  rootFile=root;
}

Fixed version (ground truth):
public void connect(){
  NamedCluster nc=getNamedClusterWidget().getSelectedNamedCluster();
  HadoopVfsConnection hdfsConnection=new HadoopVfsConnection(nc,getVariableSpace());
  hdfsConnection.setCustomParameters(Props.getInstance());
  schemeName="String_Node_Str".equals(nc.getStorageScheme()) ? "String_Node_Str" : "String_Node_Str";
  FileObject root=rootFile;
  try {
    root=KettleVFS.getFileObject(hdfsConnection.getConnectionString(schemeName));
  }
 catch (  KettleFileException exc) {
    showMessageAndLog(BaseMessages.getString(PKG,"String_Node_Str"),BaseMessages.getString(PKG,"String_Node_Str"),exc.getMessage());
  }
  vfsFileChooserDialog.setRootFile(root);
  vfsFileChooserDialog.setSelectedFile(root);
  rootFile=root;
}
Program: 47728
Project: 47728
Buggy source:
@Override public String getMainClass(){
  return mainClassFromManifest != null ? mainClassFromManifest.getCanonicalName() : null;
}

Fixed version (ground truth):
@Override public String getMainClass(){
  return mainClassName;
}
Program: 47729
Project: 47729
Buggy source:
@Override public MapReduceJarInfo getJarInfo(URL resolvedJarUrl) throws IOException, ClassNotFoundException {
  ClassLoader classLoader=getClass().getClassLoader();
  List<Class<?>> classesInJarWithMain=jarUtility.getClassesInJarWithMain(resolvedJarUrl.toExternalForm(),classLoader);
  List<String> classNamesInJarWithMain=new ArrayList<>(classesInJarWithMain.size());
  for (  Class<?> aClass : classesInJarWithMain) {
    classNamesInJarWithMain.add(aClass.getCanonicalName());
  }
  classNamesInJarWithMain=Collections.unmodifiableList(classNamesInJarWithMain);
  final List<String> finalClassNamesInJarWithMain=classNamesInJarWithMain;
  final Class<?> mainClassFromManifest=jarUtility.getMainClassFromManifest(resolvedJarUrl,classLoader);
  return new MapReduceJarInfo(){
    @Override public List<String> getClassesWithMain(){
      return finalClassNamesInJarWithMain;
    }
    @Override public String getMainClass(){
      return mainClassFromManifest != null ? mainClassFromManifest.getCanonicalName() : null;
    }
  }
;
}

Fixed version (ground truth):
@Override public MapReduceJarInfo getJarInfo(URL resolvedJarUrl) throws IOException, ClassNotFoundException {
  ClassLoader classLoader=getClass().getClassLoader();
  List<Class<?>> classesInJarWithMain=jarUtility.getClassesInJarWithMain(resolvedJarUrl.toExternalForm(),classLoader);
  List<String> classNamesInJarWithMain=new ArrayList<>(classesInJarWithMain.size());
  for (  Class<?> aClass : classesInJarWithMain) {
    classNamesInJarWithMain.add(aClass.getCanonicalName());
  }
  classNamesInJarWithMain=Collections.unmodifiableList(classNamesInJarWithMain);
  final List<String> finalClassNamesInJarWithMain=classNamesInJarWithMain;
  Class<?> mainClassFromManifest=null;
  try {
    mainClassFromManifest=jarUtility.getMainClassFromManifest(resolvedJarUrl,classLoader);
  }
 catch (  Exception e) {
  }
  final String mainClassName=mainClassFromManifest != null ? mainClassFromManifest.getCanonicalName() : null;
  return new MapReduceJarInfo(){
    @Override public List<String> getClassesWithMain(){
      return finalClassNamesInJarWithMain;
    }
    @Override public String getMainClass(){
      return mainClassName;
    }
  }
;
}
Program: 47730
Project: 47730
Buggy source:
public URL resolveJarUrl(final String jarUrl) throws MalformedURLException {
  String jarUrlS=environmentSubstitute(jarUrl);
  if (jarUrlS.indexOf("String_Node_Str") == -1) {
    File jarFile=new File(jarUrlS);
    return jarFile.toURI().toURL();
  }
 else {
    return new URL(jarUrlS);
  }
}

Fixed version (ground truth):
public static URL resolveJarUrl(final String jarUrl,VariableSpace variableSpace) throws MalformedURLException {
  String jarUrlS=variableSpace.environmentSubstitute(jarUrl);
  if (jarUrlS.indexOf("String_Node_Str") == -1) {
    File jarFile=new File(jarUrlS);
    return jarFile.toURI().toURL();
  }
 else {
    return new URL(jarUrlS);
  }
}
Program: 47731
Project: 47731
Buggy source:
private void populateDriverMenuList(){
  if (Const.isEmpty(jarUrl)) {
    return;
  }
  try {
    MapReduceJarInfo mapReduceJarInfo=namedClusterServiceLocator.getService(aConf.selectedNamedCluster,MapReduceService.class).getJarInfo(jobEntry.resolveJarUrl(jarUrl));
    List<String> driverClasses=new ArrayList<String>(mapReduceJarInfo.getClassesWithMain());
    if (Const.isEmpty(driverClass)) {
      setDriverClasses(driverClasses);
      String mainClass=mapReduceJarInfo.getMainClass();
      if (mainClass != null) {
        setDriverClass(mainClass);
      }
 else       if (!driverClasses.isEmpty()) {
        setDriverClass(driverClasses.get(0));
      }
    }
 else {
      String saveDriverClass=driverClass;
      setDriverClasses(driverClasses);
      setDriverClass(saveDriverClass);
    }
  }
 catch (  Throwable e) {
    try {
      XulRoot xulDialog=(XulRoot)getXulDomContainer().getDocumentRoot().getRootElement();
      Shell shell=(Shell)xulDialog.getRootObject();
      new ErrorDialog(shell,"String_Node_Str","String_Node_Str",e);
      setDriverClasses(Collections.<String>emptyList());
    }
 catch (    Throwable e2) {
      jobEntry.logError("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
private void populateDriverMenuList(){
  if (Const.isEmpty(jarUrl)) {
    return;
  }
  try {
    MapReduceJarInfo mapReduceJarInfo=namedClusterServiceLocator.getService(aConf.selectedNamedCluster,MapReduceService.class).getJarInfo(JobEntryHadoopJobExecutor.resolveJarUrl(jarUrl,getVariableSpace()));
    List<String> driverClasses=new ArrayList<String>(mapReduceJarInfo.getClassesWithMain());
    if (Const.isEmpty(driverClass)) {
      setDriverClasses(driverClasses);
      String mainClass=mapReduceJarInfo.getMainClass();
      if (mainClass != null) {
        setDriverClass(mainClass);
      }
 else       if (!driverClasses.isEmpty()) {
        setDriverClass(driverClasses.get(0));
      }
    }
 else {
      String saveDriverClass=driverClass;
      setDriverClasses(driverClasses);
      setDriverClass(saveDriverClass);
    }
  }
 catch (  Throwable e) {
    try {
      XulRoot xulDialog=(XulRoot)getXulDomContainer().getDocumentRoot().getRootElement();
      Shell shell=(Shell)xulDialog.getRootObject();
      new ErrorDialog(shell,"String_Node_Str","String_Node_Str",e);
      setDriverClasses(Collections.<String>emptyList());
    }
 catch (    Throwable e2) {
      jobEntry.logError("String_Node_Str",e);
    }
  }
}
Program: 47733
Project: 47733
Buggy source:
public void activate(){
  activate=true;
  ncHostname="String_Node_Str";
  ncPort="String_Node_Str";
  ncUsername="String_Node_Str";
  ncPassword="String_Node_Str";
  namedClusterWidget.setSelectedNamedCluster(namedCluster);
  super.activate();
  activate=false;
}

Fixed version (ground truth):
public void activate(){
  ncHostname="String_Node_Str";
  ncPort="String_Node_Str";
  ncUsername="String_Node_Str";
  ncPassword="String_Node_Str";
  namedClusterWidget.setSelectedNamedCluster(namedCluster);
  super.activate();
}
Program: 47736
Project: 47736
Buggy source:
protected ClassLoader findBigDataPluginClassLoader() throws Exception {
  Method findPluginById=null;
  Object pluginRegistry=null;
  Method getClassLoader=null;
  try {
    Class<?> pluginRegistryClass=Class.forName(CLASS_PLUGIN_REGISTRY);
    Class<?> pluginInterfaceClass=Class.forName(CLASS_PLUGIN_INTERFACE);
    Method getInstance=pluginRegistryClass.getMethod(METHOD_GET_INSTANCE);
    getClassLoader=pluginRegistryClass.getMethod(METHOD_GET_CLASS_LOADER,pluginInterfaceClass);
    findPluginById=pluginRegistryClass.getMethod(METHOD_FIND_PLUGIN_WITH_ID,Class.class,String.class);
    pluginRegistry=getInstance.invoke(pluginRegistryClass);
  }
 catch (  Exception ex) {
    throw new Exception("String_Node_Str",ex);
  }
  try {
    Class<?> kettleLifecyclePluginTypeClass=Class.forName(CLASS_KETTLE_LIFECYCLE_PLUGIN_TYPE);
    Object hadoopConfigurationBootstrap=findPluginById.invoke(pluginRegistry,kettleLifecyclePluginTypeClass,HADOOP_CONFIGURATION_BOOTSTRAP);
    return (ClassLoader)getClassLoader.invoke(pluginRegistry,hadoopConfigurationBootstrap);
  }
 catch (  Exception ex) {
    throw new Exception("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
ClassLoader findBigDataPluginClassLoader() throws Exception {
  Method findPluginById=null;
  Object pluginRegistry=null;
  Method getClassLoader=null;
  try {
    Class<?> pluginRegistryClass=Class.forName(CLASS_PLUGIN_REGISTRY);
    Class<?> pluginInterfaceClass=Class.forName(CLASS_PLUGIN_INTERFACE);
    Method getInstance=pluginRegistryClass.getMethod(METHOD_GET_INSTANCE);
    getClassLoader=pluginRegistryClass.getMethod(METHOD_GET_CLASS_LOADER,pluginInterfaceClass);
    findPluginById=pluginRegistryClass.getMethod(METHOD_FIND_PLUGIN_WITH_ID,Class.class,String.class);
    pluginRegistry=getInstance.invoke(pluginRegistryClass);
  }
 catch (  Exception ex) {
    throw new Exception("String_Node_Str",ex);
  }
  try {
    Class<?> kettleLifecyclePluginTypeClass=Class.forName(CLASS_KETTLE_LIFECYCLE_PLUGIN_TYPE);
    Object hadoopConfigurationBootstrap=findPluginById.invoke(pluginRegistry,kettleLifecyclePluginTypeClass,HADOOP_CONFIGURATION_BOOTSTRAP);
    return (ClassLoader)getClassLoader.invoke(pluginRegistry,hadoopConfigurationBootstrap);
  }
 catch (  Exception ex) {
    throw new Exception("String_Node_Str",ex);
  }
}
Program: 47738
Project: 47738
Buggy source:
@Override public FileSystem getFileSystem(Configuration conf) throws IOException {
  return new FileSystemProxy(org.apache.hadoop.fs.FileSystem.get(ShimUtils.asConfiguration(conf)));
}

Fixed version (ground truth):
@Override public FileSystem getFileSystem(Configuration conf) throws IOException {
  ClassLoader cl=Thread.currentThread().getContextClassLoader();
  Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
  try {
    return new FileSystemProxy(org.apache.hadoop.fs.FileSystem.get(ShimUtils.asConfiguration(conf)));
  }
  finally {
    Thread.currentThread().setContextClassLoader(cl);
  }
}
Program: 47739
Project: 47739
Buggy source:
public SortedMap<byte[],NavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,byte[]>>>> getRows(byte[] startKey,byte[] stopKey){
  SortedMap<byte[],NavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,byte[]>>>> subMap=null;
  if (startKey == null && stopKey == null) {
    return m_table;
  }
  if (stopKey == null) {
    Map.Entry<byte[],NavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,byte[]>>>> lastE=m_table.lastEntry();
    byte[] upperKey=lastE.getKey();
    BytesComparator comp=new BytesComparator();
    if (comp.compare(startKey,upperKey) != 0) {
      subMap=m_table.subMap(startKey,upperKey);
    }
 else {
      subMap=m_table.subMap(startKey,true,upperKey,true);
    }
  }
 else {
    BytesComparator comp=new BytesComparator();
    if (comp.compare(startKey,stopKey) == 0) {
      subMap=m_table.subMap(startKey,true,stopKey,true);
    }
 else {
      subMap=m_table.subMap(startKey,stopKey);
    }
  }
  return subMap;
}

Fixed version (ground truth):
public SortedMap<byte[],NavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,byte[]>>>> getRows(byte[] startKey,byte[] stopKey){
  SortedMap<byte[],NavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,byte[]>>>> subMap=null;
  if (startKey == null && stopKey == null) {
    return m_table;
  }
  if (stopKey == null) {
    Map.Entry<byte[],NavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,byte[]>>>> lastE=m_table.lastEntry();
    byte[] upperKey=lastE.getKey();
    subMap=m_table.subMap(startKey,true,upperKey,true);
  }
 else {
    BytesComparator comp=new BytesComparator();
    if (comp.compare(startKey,stopKey) == 0) {
      subMap=m_table.subMap(startKey,true,stopKey,true);
    }
 else {
      subMap=m_table.subMap(startKey,stopKey);
    }
  }
  return subMap;
}
Program: 47741
Project: 47741
Buggy source:
public static Properties getProperties(OozieJobExecutorConfig config,VariableSpace variableSpace) throws KettleFileException, IOException {
  Properties jobProps=null;
  if (config.getModeAsEnum() == JobEntryMode.ADVANCED_LIST && config.getWorkflowProperties() != null && config.getWorkflowProperties().size() > 0) {
    jobProps=new Properties();
    for (    PropertyEntry propertyEntry : config.getWorkflowProperties()) {
      if (propertyEntry.getKey() != null) {
        String value=propertyEntry.getValue() == null ? "String_Node_Str" : propertyEntry.getValue();
        jobProps.setProperty(propertyEntry.getKey(),variableSpace.environmentSubstitute(value));
      }
    }
  }
 else {
    jobProps=getPropertiesFromFile(config,variableSpace);
  }
  return jobProps;
}

Fixed version (ground truth):
public static Properties getProperties(OozieJobExecutorConfig config,VariableSpace variableSpace) throws KettleFileException, IOException {
  Properties jobProps=null;
  if (config.getModeAsEnum() == JobEntryMode.ADVANCED_LIST && config.getWorkflowProperties() != null) {
    jobProps=new Properties();
    for (    PropertyEntry propertyEntry : config.getWorkflowProperties()) {
      if (propertyEntry.getKey() != null) {
        String value=propertyEntry.getValue() == null ? "String_Node_Str" : propertyEntry.getValue();
        jobProps.setProperty(propertyEntry.getKey(),variableSpace.environmentSubstitute(value));
      }
    }
  }
 else {
    jobProps=getPropertiesFromFile(config,variableSpace);
  }
  return jobProps;
}
Program: 47743
Project: 47743
Buggy source:
@Override protected void syncModel(){
  if (!shouldUseAdvancedProperties()) {
    advancedArguments.clear();
    if (config.getWorkflowProperties() != null) {
      config.getWorkflowProperties().clear();
    }
    try {
      if (jobEntry != null && config != null) {
        Properties props=jobEntry.getProperties(config);
        for (        Map.Entry<Object,Object> prop : props.entrySet()) {
          if (prop.getKey() instanceof String && prop.getValue() instanceof String) {
            PropertyEntry pEntry=new PropertyEntry((prop.getKey()).toString(),prop.getValue().toString());
            advancedArguments.add(pEntry);
          }
        }
      }
    }
 catch (    Exception e) {
    }
  }
 else {
    ArrayList<PropertyEntry> m=new ArrayList<PropertyEntry>(advancedArguments);
    config.setWorkflowProperties(m);
  }
  config.setMode(jobEntryMode);
}

Fixed version (ground truth):
@Override protected void syncModel(){
  if (!shouldUseAdvancedProperties()) {
    advancedArguments.clear();
    if (config.getWorkflowProperties() != null) {
      config.getWorkflowProperties().clear();
    }
    preFillAdvancedArgs();
  }
 else {
    if (advancedArguments.size() == 0 && !StringUtil.isEmpty(config.getOozieWorkflowConfig())) {
      preFillAdvancedArgs();
    }
    ArrayList<PropertyEntry> m=new ArrayList<PropertyEntry>(advancedArguments);
    config.setWorkflowProperties(m);
  }
  config.setMode(jobEntryMode);
}
Program: 47748
Project: 47748
Buggy source:
protected void getData(){
  if (!Const.isEmpty(m_currentMeta.getFilename())) {
    m_avroFilenameText.setText(m_currentMeta.getFilename());
  }
  if (!Const.isEmpty(m_currentMeta.getSchemaFilename())) {
    m_schemaFilenameText.setText(m_currentMeta.getSchemaFilename());
  }
  if (!Const.isEmpty(m_currentMeta.getAvroFieldName())) {
    m_avroFieldNameText.setText(m_currentMeta.getAvroFieldName());
  }
  m_jsonEncodedBut.setSelection(m_currentMeta.getAvroIsJsonEncoded());
  m_sourceInFieldBut.setSelection(m_currentMeta.getAvroInField());
  if (m_currentMeta.getAvroFields() != null && m_currentMeta.getAvroFields().size() > 0) {
    setTableFields(m_currentMeta.getAvroFields());
  }
  if (m_currentMeta.getLookupFields() != null && m_currentMeta.getLookupFields().size() > 0) {
    setVariableTableFields(m_currentMeta.getLookupFields());
  }
  checkWidgets();
}

Fixed version (ground truth):
protected void getData(){
  if (!Const.isEmpty(m_currentMeta.getFilename())) {
    m_avroFilenameText.setText(m_currentMeta.getFilename());
  }
  if (!Const.isEmpty(m_currentMeta.getSchemaFilename())) {
    m_schemaFilenameText.setText(m_currentMeta.getSchemaFilename());
  }
  if (!Const.isEmpty(m_currentMeta.getAvroFieldName())) {
    m_avroFieldNameText.setText(m_currentMeta.getAvroFieldName());
  }
  m_jsonEncodedBut.setSelection(m_currentMeta.getAvroIsJsonEncoded());
  m_sourceInFieldBut.setSelection(m_currentMeta.getAvroInField());
  if (!m_currentMeta.getAvroInField()) {
    m_sourceInFileBut.setSelection(true);
  }
  if (m_currentMeta.getAvroFields() != null && m_currentMeta.getAvroFields().size() > 0) {
    setTableFields(m_currentMeta.getAvroFields());
  }
  if (m_currentMeta.getLookupFields() != null && m_currentMeta.getLookupFields().size() > 0) {
    setVariableTableFields(m_currentMeta.getLookupFields());
  }
  checkWidgets();
}
Program: 47750
Project: 47750
Buggy source:
protected void extractIndexedMeta(String comment,Map<String,HashSet<String>> indexedVals){
  if (comment.indexOf("String_Node_Str") < 0) {
    return;
  }
  String meta=comment.substring(comment.indexOf("String_Node_Str"),comment.lastIndexOf("String_Node_Str"));
  meta=meta.replace("String_Node_Str","String_Node_Str");
  String[] fields=meta.split("String_Node_Str");
  for (  String field : fields) {
    field=field.trim();
    String[] parts=field.split("String_Node_Str");
    if (parts.length != 2) {
      continue;
    }
    String fieldName=parts[0].trim();
    if (m_columnMeta.containsKey(fieldName)) {
      String valsS=parts[1];
      valsS=valsS.replace("String_Node_Str","String_Node_Str");
      valsS=valsS.replace("String_Node_Str","String_Node_Str");
      String[] vals=valsS.split("String_Node_Str");
      if (vals.length > 0) {
        HashSet<String> valsSet=new HashSet<String>();
        for (        String aVal : vals) {
          valsSet.add(aVal.trim());
        }
        indexedVals.put(fieldName,valsSet);
      }
    }
  }
}

Fixed version (ground truth):
protected void extractIndexedMeta(String comment,Map<String,HashSet<Object>> indexedVals){
  if (comment.indexOf("String_Node_Str") < 0) {
    return;
  }
  String meta=comment.substring(comment.indexOf("String_Node_Str"),comment.lastIndexOf("String_Node_Str"));
  meta=meta.replace("String_Node_Str","String_Node_Str");
  String[] fields=meta.split("String_Node_Str");
  for (  String field : fields) {
    field=field.trim();
    String[] parts=field.split("String_Node_Str");
    if (parts.length != 2) {
      continue;
    }
    String fieldName=parts[0].trim();
    String valsS=parts[1];
    valsS=valsS.replace("String_Node_Str","String_Node_Str");
    valsS=valsS.replace("String_Node_Str","String_Node_Str");
    String[] vals=valsS.split("String_Node_Str");
    if (vals.length > 0) {
      HashSet<Object> valsSet=new HashSet<Object>();
      for (      String aVal : vals) {
        valsSet.add(aVal.trim());
      }
      indexedVals.put(fieldName,valsSet);
    }
  }
}
Program: 47751
Project: 47751
Buggy source:
/** 
 * Decode the supplied column value. Uses the default validation class to decode the value if the column is not explicitly defined in the schema. 
 * @param aCol
 * @return
 * @throws KettleException
 */
public Object getColumnValue(Column aCol) throws KettleException {
  String colName=getColumnName(aCol);
  if (colName.equals("String_Node_Str")) {
    return null;
  }
  String decoder=m_columnMeta.get(colName);
  if (decoder == null) {
    decoder=m_defaultValidationClass;
  }
  if (decoder.indexOf("String_Node_Str") > 0) {
    return aCol.getValue();
  }
  ByteBuffer valueBuff=aCol.bufferForValue();
  return getColumnValue(valueBuff,decoder);
}

Fixed version (ground truth):
/** 
 * Decode the supplied column value. Uses the default validation class to decode the value if the column is not explicitly defined in the schema. 
 * @param aCol
 * @return
 * @throws KettleException
 */
public Object getColumnValue(Column aCol) throws KettleException {
  String colName=getColumnName(aCol);
  if (colName.equals("String_Node_Str")) {
    return null;
  }
  String decoder=m_columnMeta.get(colName);
  if (decoder == null) {
    decoder=m_defaultValidationClass;
  }
  if (decoder.indexOf("String_Node_Str") > 0) {
    return aCol.getValue();
  }
  ByteBuffer valueBuff=aCol.bufferForValue();
  Object result=getColumnValue(valueBuff,decoder);
  if (m_indexedVals.containsKey(colName)) {
    HashSet<Object> vals=m_indexedVals.get(colName);
    int foundIndex=-1;
    Object[] indexedV=vals.toArray();
    for (int i=0; i < indexedV.length; i++) {
      if (indexedV[i].equals(result)) {
        foundIndex=i;
        break;
      }
    }
    if (foundIndex >= 0) {
      result=new Integer(foundIndex);
    }
 else {
      result=null;
    }
  }
  return result;
}
Program: 47759
Project: 47759
Buggy source:
/** 
 * Decode a raw key value to the correct Object type
 * @param rawKey the key as an array of bytes
 * @param tableMapping the Mapping containing type information for the key
 * @return the decoded key value
 * @throws KettleException if something goes wrong
 */
public static Object decodeKeyValue(byte[] rawKey,Mapping tableMapping) throws KettleException {
  Mapping.KeyType keyType=tableMapping.getKeyType();
  if (rawKey == null) {
    return null;
  }
  if (keyType == Mapping.KeyType.STRING) {
    return Bytes.toString(rawKey);
  }
  if (keyType == Mapping.KeyType.UNSIGNED_LONG || keyType == Mapping.KeyType.UNSIGNED_DATE) {
    return new Long(Bytes.toLong(rawKey));
  }
  if (keyType == Mapping.KeyType.UNSIGNED_INTEGER) {
    return new Long(Bytes.toInt(rawKey));
  }
  if (keyType == Mapping.KeyType.INTEGER) {
    int tempInt=Bytes.toInt(rawKey);
    tempInt^=(1 << 31);
    return new Long(tempInt);
  }
  if (keyType == Mapping.KeyType.LONG || keyType == Mapping.KeyType.DATE) {
    long tempLong=Bytes.toLong(rawKey);
    tempLong^=(1L << 63);
    return new Long(tempLong);
  }
  throw new KettleException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Decode a raw key value to the correct Object type
 * @param rawKey the key as an array of bytes
 * @param tableMapping the Mapping containing type information for the key
 * @return the decoded key value
 * @throws KettleException if something goes wrong
 */
public static Object decodeKeyValue(byte[] rawKey,Mapping tableMapping) throws KettleException {
  Mapping.KeyType keyType=tableMapping.getKeyType();
  if (rawKey == null) {
    return null;
  }
  if (keyType == Mapping.KeyType.STRING) {
    return Bytes.toString(rawKey);
  }
  if (keyType == Mapping.KeyType.UNSIGNED_LONG || keyType == Mapping.KeyType.UNSIGNED_DATE) {
    if (keyType == Mapping.KeyType.UNSIGNED_DATE) {
      return new Date(Bytes.toLong(rawKey));
    }
    return new Long(Bytes.toLong(rawKey));
  }
  if (keyType == Mapping.KeyType.UNSIGNED_INTEGER) {
    return new Long(Bytes.toInt(rawKey));
  }
  if (keyType == Mapping.KeyType.INTEGER) {
    int tempInt=Bytes.toInt(rawKey);
    tempInt^=(1 << 31);
    return new Long(tempInt);
  }
  if (keyType == Mapping.KeyType.LONG || keyType == Mapping.KeyType.DATE) {
    long tempLong=Bytes.toLong(rawKey);
    tempLong^=(1L << 63);
    if (keyType == Mapping.KeyType.DATE) {
      return new Date(tempLong);
    }
    return new Long(tempLong);
  }
  throw new KettleException("String_Node_Str");
}
Program: 47760
Project: 47760
Buggy source:
private void populateTableCombo(){
  if (m_producer == null) {
    return;
  }
  if (m_existingTableNamesCombo.getItemCount() == 0) {
    m_existingTableNamesCombo.removeAll();
    try {
      Configuration conf=m_producer.getHBaseConnection();
      m_admin=new MappingAdmin();
      m_admin.setConnection(conf);
      HBaseAdmin admin=new HBaseAdmin(conf);
      HTableDescriptor[] tables=admin.listTables();
      for (int i=0; i < tables.length; i++) {
        String currentTableName=tables[i].getNameAsString();
        m_existingTableNamesCombo.add(currentTableName);
      }
    }
 catch (    Exception ex) {
    }
  }
}

Fixed version (ground truth):
private void populateTableCombo(boolean force){
  if (m_configProducer == null) {
    return;
  }
  if (m_existingTableNamesCombo.getItemCount() == 0 || force) {
    m_existingTableNamesCombo.removeAll();
    try {
      Configuration conf=m_configProducer.getHBaseConnection();
      m_admin=new MappingAdmin();
      m_admin.setConnection(conf);
      HBaseAdmin admin=new HBaseAdmin(conf);
      HTableDescriptor[] tables=admin.listTables();
      for (int i=0; i < tables.length; i++) {
        String currentTableName=tables[i].getNameAsString();
        m_existingTableNamesCombo.add(currentTableName);
      }
    }
 catch (    Exception ex) {
    }
  }
}
Program: 47761
Project: 47761
Buggy source:
public void focusGained(FocusEvent e){
  populateTableCombo();
}

Fixed version (ground truth):
public void focusGained(FocusEvent e){
  populateTableCombo(false);
}
Program: 47762
Project: 47762
Buggy source:
public void widgetSelected(SelectionEvent e){
  saveMapping();
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  populateTableWithIncomingFields();
}
Program: 47765
Project: 47765
Buggy source:
public void widgetSelected(SelectionEvent e){
  openFileCombo.setText(buildHadoopFileSystemUrlString());
  resolveVfsBrowser();
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  try {
    Socket testHdfsSocket=new Socket(wUrl.getText(),Integer.parseInt(wPort.getText()));
    testHdfsSocket.getOutputStream();
    testHdfsSocket.close();
  }
 catch (  Throwable t) {
    showMessageAndLog(dialog,"String_Node_Str","String_Node_Str",t.getMessage());
    return;
  }
  openFileCombo.setText(buildHadoopFileSystemUrlString());
  resolveVfsBrowser();
}
Program: 47767
Project: 47767
Buggy source:
private void showMessageAndLog(Shell dialog,String title,String message,String messageToLog){
  MessageBox box=new MessageBox(dialog);
  box.setText(BaseMessages.getString(PKG,title));
  box.setMessage(BaseMessages.getString(PKG,"String_Node_Str"));
  log.logError(messageToLog);
  box.open();
}

Fixed version (ground truth):
private void showMessageAndLog(Shell dialog,String title,String message,String messageToLog){
  MessageBox box=new MessageBox(dialog);
  box.setText(BaseMessages.getString(PKG,title));
  box.setMessage(BaseMessages.getString(PKG,message));
  log.logError(messageToLog);
  box.open();
}
Program: 47768
Project: 47768
Buggy source:
/** 
 * Returns the flag that, if <code>true</code>, causes the whiskers to be drawn using the series outline paint.
 * @return A boolean.
 * @since 1.0.14
 */
public boolean getUseOutlinePaintForWhiskers(){
  return this.useOutlinePaintForWhiskers;
}

Fixed version (ground truth):
/** 
 * Returns the flag that, if   {@code true}, causes the whiskers to be drawn using the series outline paint.
 * @return A boolean.
 * @since 1.0.14
 */
public boolean getUseOutlinePaintForWhiskers(){
  return this.useOutlinePaintForWhiskers;
}
Program: 47769
Project: 47769
Buggy source:
/** 
 * Sets the flag that, if <code>true</code>, causes the whiskers to be drawn using the series outline paint, and sends a  {@link RendererChangeEvent} to all registered listeners.
 * @param flag  the new flag value.
 * @since 1.0.14
 */
public void setUseOutlinePaintForWhiskers(boolean flag){
  if (this.useOutlinePaintForWhiskers == flag) {
    return;
  }
  this.useOutlinePaintForWhiskers=flag;
  fireChangeEvent();
}

Fixed version (ground truth):
/** 
 * Sets the flag that, if   {@code true}, causes the whiskers to be drawn using the series outline paint, and sends a  {@link RendererChangeEvent} to all registered listeners.
 * @param flag  the new flag value.
 * @since 1.0.14
 */
public void setUseOutlinePaintForWhiskers(boolean flag){
  if (this.useOutlinePaintForWhiskers == flag) {
    return;
  }
  this.useOutlinePaintForWhiskers=flag;
  fireChangeEvent();
}
Program: 47771
Project: 47771
Buggy source:
/** 
 * Returns the paint used to color the median and average markers.
 * @return The paint used to draw the median and average markers (never<code>null</code>).
 * @see #setArtifactPaint(Paint)
 */
public Paint getArtifactPaint(){
  return this.artifactPaint;
}

Fixed version (ground truth):
/** 
 * Returns the paint used to color the median and average markers.
 * @return The paint used to draw the median and average markers (never{@code null}).
 * @see #setArtifactPaint(Paint)
 */
public Paint getArtifactPaint(){
  return this.artifactPaint;
}